【发布时间】:2015-12-31 11:28:08
【问题描述】:
我想从内部去除桃色纯色,只希望它位于顶部、左侧和右侧的边界。底部颜色红色很好。我到处搜索,但他们只建议使用纯色来覆盖整个红色边框。
XML 代码
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<!-- Draw a 2dp width border around shape -->
<stroke
android:color="#ff1e0c"
android:width="2dp"
/>
</shape>
</item>
<!-- Overlap the left, top and right border using background color -->
<item
android:bottom="2dp"
>
<shape android:shape="rectangle">
<solid android:color="#fffbce"/>
</shape>
</item>
</layer-list>
【问题讨论】:
-
你能说明一下实际上需要这个吗?
-
我想做这样的层imgur.com/DQt8arf
-
如果您使用的是 tab-host,那么您可以轻松添加分隔符,它也会影响您的需要
-
不使用 tabhost。只是 LinearLayout @Survivor 中的 ImageView。
标签: android xml layer-list