Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Android] refactoring fixes layouts #6390

Merged
merged 9 commits into from
Jul 18, 2019
Merged

Conversation

paymicro
Copy link
Contributor

@paymicro paymicro commented Jun 3, 2019

Description of Change

Refactoring fixes layouts

Issues Resolved

API Changes

None

Platforms Affected

  • Android

Behavioral/Visual Changes

None

Before/After Screenshots

ListView display glitches
Before
#6355 http://recordit.co/QBMYFWyF0R

After
#6355 http://recordit.co/VBa2CAtHJt
Issue #6439 http://recordit.co/jNVIM4wkGd

Testing Procedure

Fast Renderers and Legacy Renderers

  • UITest 1332
  • UITest 1760
  • UITest 1760_1
  • UITest 5766
  • UITest 5184
  • UITest 6297
  • Issue6282

PR Checklist

  • Has automated tests
  • Rebased on top of the target branch at time of PR
  • Changes adhere to coding standard

@paymicro paymicro added this to the 4.0.0 milestone Jun 3, 2019
@paymicro paymicro marked this pull request as ready for review June 4, 2019 18:46
@samhouts samhouts added a/listview Problems with the ListView/TableView blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. t/bug 🐛 labels Jun 6, 2019
@paymicro paymicro force-pushed the paymicro/fix-android-layout branch from e6eb223 to 85f2e17 Compare June 7, 2019 10:39
Copy link
Contributor

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paymicro paymicro force-pushed the paymicro/fix-android-layout branch from 85f2e17 to d303012 Compare June 13, 2019 13:41
@paymicro paymicro requested a review from PureWeen June 13, 2019 13:55
@PureWeen PureWeen force-pushed the paymicro/fix-android-layout branch from d876e80 to 66e3d0e Compare June 18, 2019 15:03
@samhouts samhouts requested a review from hartez June 19, 2019 23:25
@samhouts samhouts modified the milestones: 4.0.0, 3.6.0 Jun 20, 2019
@samhouts samhouts added the retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. label Jun 20, 2019
@samhouts samhouts removed this from the 3.6.0 milestone Jun 21, 2019
@PouryaNoufallah96
Copy link

PouryaNoufallah96 commented Jul 18, 2019

@jingliancui

<Frame Style="{StaticResource FrameSectionStyle}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <StackLayout> <StackLayout Orientation="Horizontal"> <Label Style="{StaticResource TextListHeadline}" Text="{Binding CustomerName}" /> <Label Style="{StaticResource TextTitle}" Text="{Binding CustomerCode}" /> </StackLayout> <StackLayout Orientation="Horizontal"> <Label Margin="20,0,0,0" Style="{StaticResource TextBody}" Text="{Binding Mobile}" /> <Label Style="{StaticResource TextBody}" Text="{Binding Telephone}" /> </StackLayout> <Label Style="{StaticResource TextCaption}" Text="{Binding Address}" /> </StackLayout> </Grid> </Frame>

this is my listview item template . i monitored that page but it doesnt help:(

@PouryaNoufallah96
Copy link

@jingliancui i realized that when i put CachingStrategy="RecycleElement" this bug shows on scrolling . but now i erase the CachingStrategy property it solved my issue . but whats the solution ? i need CachingStrategy =RecycleElement

@adrianknight89
Copy link
Contributor

@jingliancui The question was intended for the Forms team :)

@adrianknight89
Copy link
Contributor

@PouryaNoufallah96 You could try using a nightly build by setting your Nuget package source to https://aka.ms/xf-ci/index.json, but I believe this fix hasn't been built yet since the latest nightly has issues still.

@marunprasadbe13
Copy link

Could you please confirm whether this fix would be included in any of the upcoming Xamarin.Forms releases ? It is required to resolve all the ListView related issues in Android.

@PouryaNoufallah96
Copy link

even the search handlers item templates has this issue on scrooling :(

@fpiribauer
Copy link

@marunprasadbe13 there are already tags for the next service releases. Seems like the relevant commits are included.

@adrianknight89
Copy link
Contributor

adrianknight89 commented Jul 24, 2019

@hartez @PureWeen I just updated to 4.3.0.971-nightly. It fixes my ListView display issues, but ListView scrolling on Android is broken. I have to swipe up and down several times before scrolling can begin (happens 50% of the cases). I'm not sure if the issue is related to this PR.

Edit: Looks like this has to do with the addition of nested scrolling as described here.

@PureWeen
Copy link
Contributor

@adrianknight89 Yea we'll have that one fixed soon.

My other thought was that perhaps you were hitting this issue on the nightly
#6944 (comment)

We're seeing a few of our UI tests locking up right now from that which we'll have resolved here soon

@PureWeen PureWeen deleted the paymicro/fix-android-layout branch July 24, 2019 14:36
@samhouts samhouts modified the milestones: 4.0.0, 3.5.0 Aug 1, 2019
@mfeingol
Copy link

mfeingol commented Aug 3, 2019

@samhouts: any idea which release versions will see these fixes?

Thanks.

@morphinapg
Copy link

morphinapg commented Aug 3, 2019

@mfeingol I installed 4.1.0.618606 and it solved my issues

@mfeingol
Copy link

mfeingol commented Aug 3, 2019

@morphinapg: thanks! That version does seem to have fixed my issues on Android.

@jingliancui
Copy link

#6889
this bug still not fix in 4.1.0.618606

@mdmota
Copy link

mdmota commented Sep 23, 2019

this bug still not fix in 4.2.0

@nicolasmab
Copy link

nicolasmab commented Sep 25, 2019

In 4.2.0, a ListView with RecycleElement, and Images with IsVisible property is still causing images to randomly appear in rows that shouldn't. This occurs after some scrolling, in both iOS and Android. (This was working fine in 3.6)

As a workaround until this is fixed, the IsVisible property can be moved inside an <Image.Trigger>:

From:

<Image Source="comment.png"
       IsVisible="{Binding HasComment}" />

To

<Image Source="comment.png">
    <Image.Triggers>
        <DataTrigger TargetType="Image" Binding="{Binding HasComment}" Value="True">
            <Setter Property="IsVisible" Value="True" />
        </DataTrigger>
        <DataTrigger TargetType="Image" Binding="{Binding HasComment}" Value="False">
            <Setter Property="IsVisible" Value="False" />
        </DataTrigger>
    </Image.Triggers>
</Image>

@DavidCFreire
Copy link

Any news on that? having same issues here with XF4.0 or XF4.1

@DavidCFreire
Copy link

I just updated to XF4.3.0.778476-pre1 and apparently this solved the problem... no problems until now

@mdmota
Copy link

mdmota commented Oct 14, 2019

this bug still not fix in XF4.3.0.778476-pre3

@mdmota
Copy link

mdmota commented Oct 24, 2019

After upgrading XF to 4.3.0 and replacing listivew with colletionView, the problem continues
#8199 (comment)

@SachinCS1992
Copy link

This PR seems have to introduced a new issue on Android Editor, where if the Editor lives inside a ScrollView, on first load of Editor we can't select the words to be able to copy/paste/select all text. If we flip device orientation, it fixes the issue. Tried reverting commit locally and re-published a package and that fixed the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/collectionview a/layout a/listview Problems with the ListView/TableView blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. i/regression p/Android partner/cat 😻 t/bug 🐛
Projects
None yet
Development

Successfully merging this pull request may close these issues.