Xamarin.Forms
Xamarin.Forms copied to clipboard
[Bug] [Android] TabbedPage overrides Entry values when more than 4 Pages are added
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
- Create TabbedPage
- Add 6 ContentPages containing a StackLayout with e.g. 4 Entry Controls
- Set different Texts on all Entry Controls
- Start the Application and swipe / select through Tabs
- 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
-
Version with issue: 3.6.0.344457
-
Last known good version:
-
IDE: Visual Studio 2019
-
Platform Target Frameworks:
- Android: 9.0
-
Android Support Library Version: 28.0.0.1
-
Nuget Packages: Xamarin.Forms: 3.6.0.344457 Xamarin.Android.Support.Design: 28.0.0.1 Xamarin.Android.Support.v7.AppCompat: 28.0.0.1 Xamarin.Android.Support.v4: 28.0.0.1 Xamarin.Android.Support.v7.CardView: 28.0.0.1 Xamarin.Android.Support.v7.MediaRouter: 28.0.0.1 Xamarin.Android.Support.Core.Utils: 28.0.0.1 Xamarin.Android.Support.CustomTabs: 28.0.0.1 Xamarin.Essentials: 1.1.0 Xamarin.Forms.Visual.Material: 3.6.0.344457
-
Affected Devices: Samsung Galaxy A5 (2017) running Android 8.0 Samsung Galaxy Tab S4 running Android 9.0
Screenshots
Reproduction Link
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... :(
Yes I agree.
Hm, getting a deployment error:
Shane, let us know if you have better luck deploying.
Any news ?
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.
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);