question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ViewPager2 with tab navigation

See original GitHub issue

Xamarin.Android Version (eg: 6.0):

10.2.99.180

Operating System & Version (eg: Mac OSX 10.11):

Ubuntu 19.10

Support Libraries Version (eg: 23.3.0):

Xamarin.Google.Android.Material 1.0.0

Describe your Issue:

I’m trying to implement a ViewPager2 with tab navigation, based on this guide, but I noticed that there isn’t a TabLayoutMediator binding in the Xamarin.Google.Android.Material package. There is a workaround to do this with ViewPager2, or do I will have to wait to the next releases?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
moljaccommented, Apr 8, 2020

but I noticed that there isn’t a TabLayoutMediator binding in the Xamarin.Google.Android.Material package.

if I recall it correctly it is not in 1.0.0, but in version 1.1.0.

OK I don’t have whole API or changelogs in my head, so I might be wrong.

There is a workaround to do this with ViewPager2, or do I will have to wait to the next releases?

There is version 1.1.0-rc3 of Material, but there is a bug and fix/workaround which needs more testing. Until 1.1.0 is released as stable you will have to stick with rc or not use this feature.

https://www.nuget.org/packages/Xamarin.Google.Android.Material/1.1.0-rc3

1reaction
jpobstcommented, Nov 24, 2020

I’m not sure what you mean by “not implemented”? It seems to exist in 1.1.0.5:

image

I can re-open the issue if it still isn’t working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create swipe views with tabs using ViewPager2
Swipe views let you navigate between sibling screens, such as tabs, with a horizontal finger gesture, or swipe. This navigation pattern is ...
Read more >
How to use TabLayout with ViewPager2 in Android
You have to use this TabLayoutMediator that mimics tabLayout.setupWithViewPager() and sets up the ViewPager2 with Tablayout .
Read more >
How to use ViewPager2 with TabLayout in Android?
TabLayout is used to display tabs horizontally, while ViewPager2 is used to creating views in a swipeable format. Let's start to use ViewPager2...
Read more >
How to combine TabLayout with ViewPager2 and NavGraph ...
In this post, we will learn how to combine TabLayout, ViewPager2 and NavGraph. TabLayout is used to create a tab bar and for...
Read more >
ViewPager2 with TabLayout in Android
TabLayout enhances you to display tabs horizontally. Well in this case, implementation of the ViewPager2 with TabLayout helps to create views in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found