【发布时间】:2012-04-23 13:44:59
【问题描述】:
我正在尝试创建一个标签,如下所示,它是一个 Holo Light 主题,但由于我使用的是 android 2.3.6,所以我必须自己创建它。
我面临的问题是我的机器人能够像这样创建蓝底 这是到目前为止在可绘制对象中的代码,谁能告诉我如何创建相同的底部边框?
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:top="63dp">
<shape android:shape="rectangle">
<solid android:color="#898989" />
</shape>
</item>
<item android:top="63dp" android:bottom="3px">
<shape android:shape="rectangle">
<solid android:color="@color/app_background" />
</shape>
</item>
<item android:left="@dimen/tab_space" android:right="@dimen/tab_space">
<shape android:shape="rectangle">
<gradient android:angle="90" android:startColor="#d9d9d9"
android:endColor="#dfdfdf"/>
<!-- this is create a border but on every side -->
<stroke android:width="3px" android:color="#38c0f4" />
</shape>
</item>
</layer-list>
所以我不知道是创建
1) bottom stroke
2) shadow under each tab
【问题讨论】:
标签: android android-layout android-tabhost android-2.3-gingerbread