我想为类似标签的浏览器创建自定义tabhost。我对如何将它应用于像Chrome浏览器选项卡中的布局一样感到困惑,就像在图像中一样。在Chrome浏览器中为Android创建自定义tabhost
这是我都试过了。我想知道如何在图像中创建具有斜率的边缘。
tab_selected.xml
<item>
<shape android:shape="rectangle" >
<solid android:color="#DCDCDC" />
<corners
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />
</shape>
</item>
<item
android:bottom="2dp"
android:left="1dp"
android:right="1dp"
android:top="1dp">
<shape android:shape="rectangle" >
<solid android:color="#DCDCDC" />
<corners
android:topLeftRadius="10dp"
android:topRightRadius="10dp" />
</shape>
</item>
tab_unselected.xml
<item android:top="10dp">
<shape android:shape="rectangle" >
<solid android:color="#AAAAAA" />
</shape>
</item>
<item android:bottom="2dp">
<shape android:shape="rectangle" >
<solid android:color="#AAAAAA" />
<corners
android:topLeftRadius="10dp"
android:topRightRadius="10dp" />
</shape>
</item>
我希望可以在XML中使用Pathshape来完成。任何人都可以指出我的参考?无法在PathShape上找到引用
你不能将它们创建为一个xml drawable,九个补丁更合适。 – Luksprog
@Luksprog我希望通过编程方式使用PathShape来完成它。这是可能的吗? – intrepidkarthi
@intrepidkarthi你有没有发现任何解决方案 – UnderGround