三種方式實作自定義圓形頁面加載中效果的進度條
to get a progressbar in the default theme that is to be used on white/light back ground, use one of the inverse styles:
<progressbar style="@android:style/widget.progressbar.inverse"/>
<progressbar style="@android:style/widget.progressbar.large.inverse"/>
<progressbar style="@android:style/widget.progressbar.small.inverse"/>
進度條
一、通過動畫實作
定義res/anim/loading.xml如下:
在layout檔案中引用如下:
二、通過自定義顔色實作
定義res/drawable/dialog_style_xml_color.xml如下:
三、使用一張圖檔進行自定義
定義res/drawable/dialog_style_xml_icon.xml如下:
main.xml如下:
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLicmbw5SZkJGO4AzMhR2N5ETL3AjMi1yYiV2MtIjNjRTL5IWZhZmNjRzLcNDNyMzLchjNwAzLcRnbl1GajFGd0F2LcRWYvxGc19CXt92YuUWelRXauwGZvw1LcpDc0RHaiojIsJye.png)
countdown.zip (286.6
kb)