zoukankan      html  css  js  c++  java
  • ProgressBar

    ProgressBar可以设置样式常见的有大圆圈小圆圈,还有就是横这的进度条这里要通过style来设置

              android:id="@+id/pb_one"
            style="?android:attr/progressBarStyleLarge"//这里是设置样式的用?
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

                android:id="@+id/pb_two"
            style="?android:attr/progressBarStyleHorizontal"   //水平进度条
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:progress="30"                             //设置第一进度条的当前进度为30,默认为100
            android:secondaryProgress="50" />       //设置第二进度条的当前进度为50,默认为100
    通过点击来让进度条增加和减少就比较简单了
    思路就是获得当前进度值,然后加上进度,在设置当前进度就可以了。

    int pro = pb_two.getProgress();
        int cf = pro+10;
        pb_two.setProgress(cf);

    减少同理

  • 相关阅读:
    springmvc
    POJ 3683 Priest John's Busiest Day
    POJ 3678 Katu Puzzle
    HDU 1815 Building roads
    CDOJ UESTC 1220 The Battle of Guandu
    HDU 3715 Go Deeper
    HDU 3622 Bomb Game
    POJ 3207 Ikki's Story IV
    POJ 3648 Wedding
    HDU 1814 Peaceful Commission
  • 原文地址:https://www.cnblogs.com/84126858jmz/p/4869648.html
Copyright © 2011-2022 走看看