<ProgressBar android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/progressbar_dialog" android:layout_below="@id/auto_complete_text1" android:max="100" android:progress="50" android:secondaryProgress="80"style="?android:attr/progressBarStyleHorizontal"/>
max:最大进度
progress:现有进度
secondaryProgress:缓存进度
style="?android:attr/progressBarStyleHorizontal"水平进度条样式
1、对话框
ProgressDialog pd = new ProgressDialog(this); pd.setMax(100); pd.setTitle("对话框进度条");pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);//上一句 设置水平进度条pd.setProgress(50);pd.setMessage("正在下载中...");pd.show();