zoukankan      html  css  js  c++  java
  • Android progressbar条形带背景渐变进度风格进度条

    效果图:

    代码如下:

    <ProgressBar
            android:id="@+id/progressBar"
            style="?android:attr/progressBarStyleHorizontal"
            android:layout_width="0dp"
            android:layout_height="20dp"
            android:layout_weight="1"
            android:progressDrawable="@drawable/progress_area_statistic"
            android:max="100" />
    progress_area_statistic文件:
    <?xml version="1.0" encoding="UTF-8"?>
    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:id="@android:id/background">
            <shape>
                <corners android:radius="3dp" />
                <solid android:color="#503141"/>
            </shape>
        </item>
    
        <item android:id="@android:id/secondaryProgress">
            <clip>
                <shape>
                    <corners android:radius="2dip" />
                    <gradient
                        android:angle="270"
                        android:centerColor="#FB2966"
                        android:endColor="#FF2854"
                        android:startColor="#F72A77" />
                    <padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp"/>
                </shape>
            </clip>
        </item>
    
        <item android:id="@android:id/progress">
            <clip>
                <shape>
                    <corners android:radius="2dip" />
                    <gradient
                        android:angle="270"
                        android:centerColor="#FB2966"
                        android:endColor="#FF2854"
                        android:startColor="#F72A77" />
                    <padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp"/>
                </shape>
            </clip>
        </item>
    </layer-list>
  • 相关阅读:
    C#:类的学习
    SilverLight xaml页面跳转方法
    C#对象生命周期(转载)
    jquery常用的方法
    关于Java日期简单应用
    Compilingphpwithcrypt()
    SSI使用详解
    实例解析:从IIS的ASP迁移到APACHE的PHP
    三步搞定phpwind的静态化部署
    Informix Dynamic Server 中的分布式事务
  • 原文地址:https://www.cnblogs.com/feijian/p/6247952.html
Copyright © 2011-2022 走看看