自定义选项卡指示器图像的android? [英] Customizing tab indicator images in android?

查看:137
本文介绍了自定义选项卡指示器图像的android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改标签指示的图像的android?有一个<一个href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=core/res/res/drawable/tab_indicator.xml;hb=HEAD"相对=nofollow> tab_indicator.xml 文件内置的Andr​​oid SDK中。在该<一href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=core/res/res/layout/tab_indicator.xml;hb=HEAD"相对=nofollow>相对布局有背景为tab_indicator 文件作为背景。如何在tab_indicator自定义此图像和设置我们的新形象?我有没有被选中选项卡下的图像line.because突出了白色的问题。如何自定义的呢?

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来access.how可以吗?你知道吗?请大家帮帮忙。

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

注:<一href="http://stackoverflow.com/questions/773690/android-customizing-tabs-on-state-how-do-i-make-a-selector-a-drawable/779588#779588">Reto迈耶的回答的一年前说。其不可能在那个时候。现在呢?

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

推荐答案

我不知道,我100%理解​​这个问题。如果你想自定义视图作为选项卡指示器没有该API <一href="http://developer.android.com/reference/android/widget/TabHost.TabSpec.html#setIndicator(android.view.View" rel="nofollow">http://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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆