在android中自定义标签指示器图像? [英] Customizing tab indicator images in android?
问题描述
如何在 android 中更改标签指示器的图像?有一个 tab_indicator.xml 文件内置在 android sdk 中.在那 相对布局将背景作为 tab_indicator 文件作为背景.如何在 tab_indicator 中自定义这些图像并设置我们的新图像?我有一个问题,未选择的选项卡在线条下用白色突出显示.因为这些图像.如何定制它?
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?
RelativeLayout 没有要访问的 id.我该怎么办?有什么想法吗?请帮忙.
That RelativeLayout doesn't have the id to access.how can i?Any Idea? Please help.
注意:Reto Meier 的回答 一年前说.当时是不可能的.现在呢?
Note: Reto Meier's answer a year ago says. its not possible at that time. what about now?
推荐答案
我不确定我是否 100% 理解这个问题.如果您想要自定义视图作为您的选项卡指示器,那么可以使用 APIhttp://developer.android.com/reference/android/widget/TabHost.TabSpec.html#setIndicator(android.view.View)
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)
这篇关于在android中自定义标签指示器图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!