Android snippet menu options appear too slow on ViewPager screen

While working with ActionBar tabs (which are fragments) that can be scrolled using the ViewPager, I learned that the user menu options for each fragment were added quite recently to the ActionBar.

This is the behavior that I recognized:

  • Swipe to next tab
  • Tab reached
  • ~ 10 ms with a blank panel Options
  • An item from a fragment is displayed in an ActionBar.

The "10ms gap" looks pretty ugly and it would be great to solve this problem.

I looked at native Android apps, and I can reproduce the problem in my own ICS / JB suite. (switching from the contacts tab to the call log) When I watch the Play Movies application, the β€œ10ms” space disappears (switching from films to personal films), so it should be possible to somehow solve the problem.

It is also interesting that there is no space when clicking on the tab. A click causes the parameter item to display instantly.

It would be great if someone helped me solve the problem.

+6
source share

Source: https://habr.com/ru/post/924046/


All Articles