I want to switch screens with Android Navigation drawer and use tabs on the screens.

Asked 2 years ago, Updated 2 years ago, 31 views

In the GooglePlay Store application, the tab is used for the screen that was switched in NavigationDrawer. Example) Drawer → My App → Installed, All (←Here) Does anyone know how to make this happen with your app?

What you want to do is switch between screens with NavigationDrawer and use tabs inside the screen.

android

2022-09-29 21:47

2 Answers

Switch between screens in NavigationDrawer

The official Handle Navigation Click Events shows you how to switch Fragments.

http://developer.android.com/intl/ja/training/implementing-navigation/nav-drawer.html#ListItemClicks

Use tabs in the screen

I think the Playstore app tab is (probably) enabled by ViewPager+PagerTitleStrip.

http://qiita.com/mackiso/items/1dacec44d9096bc6d900


2022-09-29 21:47

New Android Studio Project Creation Template Navigation Drawer Activity So if you create it based on that, you can't switch Fragments in NavigationDrawer. Easy to create.

The tab in NavigationDrawer is displayed as Mr. fkm said, ViewPager+PagerTitleStrip I think so.

Since setNavigationMode is deprecated from Android 5.0, This is likely to be the mainstream tab implementation in the future.


2022-09-29 21:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.