0
我如何製作帶有白色矩形的透明圓形的佈局樣式?如何在xml中設置外部形狀的背景?透明圓形
如果我使圓透明的背景,然後我只看到白色的矩形(我知道爲什麼),任何可能的解決? 像這樣: screenshot http://ipicture.kz/images/2014/07/6eijxdbpjjsstuularkx.jpg (無邊框)
我如何製作帶有白色矩形的透明圓形的佈局樣式?如何在xml中設置外部形狀的背景?透明圓形
如果我使圓透明的背景,然後我只看到白色的矩形(我知道爲什麼),任何可能的解決? 像這樣: screenshot http://ipicture.kz/images/2014/07/6eijxdbpjjsstuularkx.jpg (無邊框)
創建一個XML抽拉:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:useLevel="false">
<solid android:color="@android:color/white" />
</shape>
</item>
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="ring"
android:thicknessRatio="2"
android:innerRadius="0dp"
android:useLevel="false">
<solid android:color="@android:color/darker_gray" />
</shape>
</item>
</layer-list>
不在XML,恐怕 – pskink
另外兩個途徑然後風格: 1.你可以設置像這樣的圖像到佈局的背景 2.你可以創建xml可繪製並設置爲佈局背景 –
你可以使用9補丁 –