所以我有一個帶有空心圓的可繪制矢量。圓的線太細了,所以我想用 android:strokeWidth 讓它變大,但它不會改變任何東西。有任何想法嗎?
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:fillColor="@color/grey"
android:pathData="M24.3,1.5C11.9,1.5 1.8,11.6 1.8,24s10.1,22.5 22.5,22.5S46.8,36.4 46.8,24S36.7,1.5 24.3,1.5zM24.3,43.8C13.4,43.8 4.5,34.9 4.5,24S13.4,4.2 24.3,4.2c10.9,0 19.8,8.9 19.8,19.8S35.2,43.8 24.3,43.8z"/>
</vector>
uj5u.com熱心網友回復:
像那樣?
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:fillColor="@color/grey"
android:strokeColor="@color/grey"
android:strokeWidth="3"
android:pathData="M24.3,1.5C11.9,1.5 1.8,11.6 1.8,24s10.1,22.5 22.5,22.5S46.8,36.4 46.8,24S36.7,1.5 24.3,1.5zM24.3,43.8C13.4,43.8 4.5,34.9 4.5,24S13.4,4.2 24.3,4.2c10.9,0 19.8,8.9 19.8,19.8S35.2,43.8 24.3,43.8z">
</path>
</vector>
uj5u.com熱心網友回復:
試試看
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke
android:width="5dp"
android:color="@color/grey" />
<size
android:width="48dp"
android:height="48dp" />
</shape>
改變寬度
<stroke android:color="@color/black"
android:width="5dp"/>
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/411575.html
標籤:
下一篇:滾動視圖中帶有文本的多個影像視圖
