如何设置标签控件指标的身高在android系统? [英] How to set tab widget indicator's height in android?
本文介绍了如何设置标签控件指标的身高在android系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
欲减少所选标签指示器的高度,我使用9补丁图像它。可否请您让我知道如果你有同样的任何想法?
谢谢你。
I want to reduce the height of selected tab indicator, I have used 9 patch image for it. Can you please let me know if you have any idea for the same ? Thanks.
推荐答案
我用这个code:
<!-- Focused states -->
<item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected_focused_example" />
<item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_focused_example" />
<!-- Pressed -->
<!-- Non focused states -->
<item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_example" />
<item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_example" />
<!-- Focused states -->
<item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_example" />
<item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_example" />
和投入绘9片图像,现在它完美的作品。
and 9 patch images put in drawable, now it works perfectly.
这篇关于如何设置标签控件指标的身高在android系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文