
666 那個橫條 下邊的是圓角,怎么把上邊的直線弄出弧度?
uj5u.com熱心網友回復:
我大概能理解你的需求,,這個效果只是一個shape是無法完成的,需要用到 layer-list,以兩個圖形覆寫的方式實作。
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!--這一層是底下這條線的背景-->
<item
android:width="100dp"
android:height="100dp">
<shape android:shape="rectangle">
<solid android:color="@color/red" />
<corners android:radius="10dp" />
</shape>
</item>
<!--這一層作為前景覆寫背景,顏色與頁面背景一致-->
<item
android:width="100dp"
android:height="80dp"
android:bottom="20dp">
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
<corners android:radius="10dp" />
</shape>
</item>
</layer-list>
uj5u.com熱心網友回復:
這樣不行啊
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/62741.html
標籤:Android
上一篇:Android圖片處理
