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

Bottom Navigation Tab Bar With 5 Tab Items Issue #10783

Closed
jaigupta91 opened this issue May 20, 2020 · 1 comment
Closed

Bottom Navigation Tab Bar With 5 Tab Items Issue #10783

jaigupta91 opened this issue May 20, 2020 · 1 comment
Labels
a/tabbedpage p/Android s/unverified New report that has yet to be verified t/bug 🐛

Comments

@jaigupta91
Copy link

Description

Created a tabbed page with 5 tab items. When we switch from between 1-4 tab items it works fine. When we click on 5 tab item and then click on any of tab from 1-4 it reload the view everytime. It calls OnSizeAllocated() method everytime. It happens in android.

Steps to Reproduce

  1. Run the uploaded project.

Expected Behavior

It should not refresh/reload the view.

Actual Behavior

It's reloading every time.

Basic Information

  • Version with issue: Xamarin.forms 4.3.0.947036 and afterwords
  • Last known good version: Xamarin.forms 3.4.0.1009999
  • IDE: Visual Studio 2019
  • Platform Target Frameworks:
    • Android: 9.0

Reproduction Link

TabBar.zip

@samhouts samhouts added a/tabbedpage p/Android s/unverified New report that has yet to be verified t/bug 🐛 labels May 26, 2020
@samhouts
Copy link
Member

The Android ViewPager, which is backing the TabbedPage, keeps a minimum number of pages loaded in memory to keep the UI fast and responsive. If you go beyond the initial offscreen limit, it will start disposing pages and recreating them as needed. If you want to prevent this, you can increase the offscreen limit using the TabbedPage.OffscreenPageLimit platform specific (see https://docs.microsoft.com/en-us/xamarin/xamarin-forms/platform/android/tabbedpage-page-swiping). However, keep in mind that this will slow down your startup time and inflate your app's memory usage. In any event, this is expected behavior.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/tabbedpage p/Android s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

2 participants