編輯:?jiǎn)栴} 1) 已解決。但我還是無(wú)法改變color的ProgressBar。我嘗試使用我自己的theme(見(jiàn)下面的代碼)。我希望我ProgressBar的看起來(lái)像下圖。我已經(jīng)創(chuàng)建了ProgressBar我的上述ListView使用.I'm ListView,ProgressBar和兩個(gè)TextViews中RelativeLayout。我的問(wèn)題:1.) 我怎樣才能按照下面顯示的方式對(duì)齊TextViews上面的內(nèi)容ProgressBar?2.) 如何設(shè)置ProgressBar自身的顏色和 的背景顏色ProgressBar?主活動(dòng).xml <ProgressBar android:id="@+id/progressBar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/progressBarText" android:progress="0" android:max="100" android:paddingTop="0dp" android:paddingBottom="10dp" android:paddingLeft="10dp" android:paddingRight="10dp" android:theme="@style/progressBarTheme" style="@style/Widget.AppCompat.ProgressBar.Horizontal"/>樣式文件<resources><!-- Base application theme. --><style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item></style><style name="DialogTheme" parent="Theme.AppCompat.Light.Dialog"> <item name="colorAccent">@android:color/holo_green_dark</item></style><style name="progressBarTheme" parent="@style/Theme.AppCompat"> <item name="colorAccent">@color/myRedColor</item></style></resources>
如何創(chuàng)建自定義進(jìn)度條
桃花長(zhǎng)相依
2021-10-28 16:41:23