1
這裏是我的應用程序看起來像現在的截圖:外形與唯一的「內圓角」
http://www.abload.de/image.php?img=unbenannt4kqjb.png
這是灰色的形狀代碼:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:top="0dp"
android:bottom="0dp"
android:left="0dp"
android:right="0dp" >
<shape
android:shape="rectangle" >
<stroke
android:width="8dp"
android:color="#9b9c9c" />
<padding
android:left="13dp"
android:top="13dp"
android:right="13dp"
android:bottom="13dp" />
<corners
android:radius="10dp"
android:topLeftRadius="0dp"
android:bottomRightRadius="0dp" />
<solid
android:color="@android:color/background_light" />
</shape>
</item>
正如您在截圖中看到的,右上角和左下角仍然是白色。好的,我用紅色標記,所以它更容易識別。我想用與灰色形狀相同的灰色來爲這件紅色着色,所以只有一個「內圓角」。我希望你明白我的意思。
我包括形狀通過設置爲佈局的背景。
在此先感謝。
嘗試draw9patch圖像作爲背景。 –
在下面使用另一個簡單的矩形。 – dragostis