1
我遵循示例here嘗試創建「繁忙」旋轉進度輪。Android'busy spinner'(進度條)未着色
微調的外觀在busy_spinner.xml定義如下:
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="90"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="360">
<shape
android:innerRadiusRatio="3"
android:shape="ring"
android:tint="#0000FF"
android:thicknessRatio="7.0">
<gradient
android:angle="0"
android:centerColor="#0000FF"
android:endColor="#9999FF"
android:type="sweep"
android:useLevel="false" />
</shape>
</rotate>
,它是包含在我的佈局文件,如下所示:
<ProgressBar
android:id="@+id/working_bluebadgeparking_reachable"
style="?android:attr/progressBarStyleLarge"
android:layout_width="24dp"
android:layout_height="24dp"
android:visibility="gone"
android:progressDrawable="@drawable/busy_spinner" />
與知名度被打開和關閉以編程方式,一切看起來不錯,只是微調是紅色的!
正如你可以在busy_spinner.xml中看到的那樣,我已經將微調器定義爲一個漂亮的藍色漸變,但顏色不起作用。
這是在一個棒棒糖HTC One和在最新的Nexus 5 Rom的模擬器。 –