I'm having a look at the "Tab Layout" tutorial which is perfectly clear and my question is very simple : is it possible to create tabs with no icon, just a single title?
相关问题
- 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
worked for me
Yes. If you are doing something like:
Change it to:
I guess you are reading Tab layout tutorial There you can see that they use following function to set title and icon:
Same function has another version, which does not take drawable as parameter
So, this second version of the function creates tab without icon. Simple answer - yes, you can create tabs with title only.
You can use
TabSpec.setIndicator(View view)
method to customize your indicator, this method was introduced since API level 4.You can set a fixed height of the tabwidged.
In the Code:
Or in the XML: ..
.. (with
android:gravity
you can affect where ur tabwidget gets cut)