zoukankan      html  css  js  c++  java
  • ProgressDialog 的xml 功能布局

    而选择动画进度条显示进度:

    1.   用类构造器初始化进度对话框,ProgressDialog(Context)。

    2.   用setProgressStyle(int)方法设置进度风格为"STYLE_HORIZONTAL"以及设置其它属性,比如消息。

    创建ProgressDialog大概是这样的:

    1. ProgressDialog progressDialog = new ProgressDialog(getApplicationContext());  
    2.   
    3. progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);  
    4. progressDialog.setIcon(R.drawable.alert_dialog_icon);  
    5. progressDialog.setMessage("Loading...");  
    6. progressDialog.setCancelable(false);  

    3.   当你准备显示这个对话框时,调用show()或者从onCreateDialog(int)回调中返回ProgressDialog。

    4.   你可以通过调用setProgress(int)设置当前进度百分比或者调用incrementProgressBy(int)方法增加进度值。

    <ProgressBar android:id=”@+id/ProgressBar01″ 

    android:layout_width=”wrap_content” 

    android:layout_height=”wrap_content”> 

    </ProgressBar> 

    <ProgressBar android:id=”@+id/ProgressBar02″ 

    style=”?android:attr/progressBarStyleLarge”           大圆圈 

    android:layout_width=”wrap_content” 

    android:layout_height=”wrap_content”> 

    </ProgressBar> 

    <ProgressBar android:id=”@+id/ProgressBar03″ 

    style=”?android:attr/progressBarStyleSmall”          小圆圈 

    android:layout_width=”wrap_content” 

    android:layout_height=”wrap_content”> 

    </ProgressBar> 

  • 相关阅读:
    Leetcode第七题——数的反转
    Leetcode第六题——横向遍历ZIGZAG数组
    26 将查询结果插入到一张表中?
    25 表的复制
    24 insert 语句插入数据
    23 创建表
    22 limit(重点中的重点,以后分页查询全靠它了。)
    21 union(可以将查询结果集相加
    20 子查询
    19 连接查询
  • 原文地址:https://www.cnblogs.com/firecode/p/2671148.html
Copyright © 2011-2022 走看看