Customizing tab indicator images in android?

不打扰是莪最后的温柔 提交于 2019-12-18 05:16:28

问题


how to change the tab indicator's images in android? there is a tab_indicator.xml file in-built in android sdk. in that the Relative layout has the background as a tab_indicator file as background. how to customize this images in tab_indicator and set our new images? I have a problem that the not selected tabs are highlighted with a white under line.because of those images. how to customize it?

That RelativeLayout doesn't have the id to access.how can i?Any Idea? Please help.

Note: Reto Meier's answer a year ago says. its not possible at that time. what about now?


回答1:


I'm not sure that i 100% understand the problem. If you want custom view as your tab indicator there is API for that http://developer.android.com/reference/android/widget/TabHost.TabSpec.html#setIndicator(android.view.View)



来源:https://stackoverflow.com/questions/2810075/customizing-tab-indicator-images-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!