xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

[Bug] [Android] TabbedPage overrides Entry values when more than 4 Pages are added #6259

Open Kornelis opened 5 years ago

Kornelis commented 5 years ago

Description

When using a TabbedPage with more than 4 Sub-Pages containting Entry Controls, the Entry Texts of the first Tab get overwritten when the >= 5th Tab is selected.

Steps to Reproduce

  1. Create TabbedPage
  2. Add 6 ContentPages containing a StackLayout with e.g. 4 Entry Controls
  3. Set different Texts on all Entry Controls
  4. Start the Application and swipe / select through Tabs
  5. When reaching Tab Nr. 5 select Tab Nr. 1 on the Tabbar

Expected Behavior

All Entry Controls on Tab 1 have their inital Text value set

Actual Behavior

All Entry Controls on Tab 1 have the Text Value of the last Entry Control set

Basic Information

Screenshots

TabbedPageEntryIssue

Reproduction Link

TabbedPageEntryIssue.zip

MaxenceSAUNIER commented 5 years ago

6188

Kornelis commented 5 years ago

Thanks for the Hint. When setting Visual="" on the TabbedPage Element, everything is working as expected. But disabling the Material Visual isn't an option anymore... :(

MaxenceSAUNIER commented 5 years ago

Yes I agree.

kingces95 commented 5 years ago

Hm, getting a deployment error: image

kingces95 commented 5 years ago

Shane, let us know if you have better luck deploying.

MaxenceSAUNIER commented 4 years ago

Any news ?

SteveGrixti commented 4 years ago

Hi,

This is turning out to be a big issue for me.

I have a form on my android application that consists of 8 tabs. As soon as I skipped the 5th tab, it is hiding the bound values on the first tab even though they are still attached to the bindingcontext. Then, when I move onto the 6th tab, it hides the bound values of the second tab, and so on and so forth.

Same issue as @Kornelis.

Is this being looked at?

Thanks.

SteveGrixti commented 4 years ago

Hi,

This is turning out to be a big issue for me.

I have a form on my android application that consists of 8 tabs. As soon as I skipped the 5th tab, it is hiding the bound values on the first tab even though they are still attached to the bindingcontext. Then, when I move onto the 6th tab, it hides the bound values of the second tab, and so on and so forth.

Same issue as @Kornelis.

Is this being looked at?

Thanks.

UPDATE:

Just to let everyone know, I managed to get around this by making use of the Android specific method SetOffscreenPageLimit() as shown below. Issue no longer occurs.

Children.Add(new Page());
Children.Add(new Page());
Children.Add(new Page());
Children.Add(new Page());
Children.Add(new Page());
Children.Add(new Page());
Children.Add(new Page());
Children.Add(new Page());

On<Android>().SetOffscreenPageLimit(10);