I'm currently creating an application that uses navigation drawer and fragments . In one fragment I want to create a tab layout which should be made in a fragment activity . My question is whether there are alternative ways that can be used to implement the tab layout inside fragment ?. Thank you in advance
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
You should be able to create a view with tab layout like in a normal activity. Then create your class for the tab layout and extend FragmentActivity and implement TabListener. In this fragment you just inflate the tabview into your fragmentcontainer like you do with all fragments and you should be able to do everything you're used to do with a TabLayout.
This links would probably be useful for you : Android Tab Layout inside Fragment
Take a look at following code :
Here R.id.content is FrameLayout where you showing fragments.(Like a layout named content_frame having only FrameLayout with id content.)