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>
  • 相关阅读:
    hdu-5569 matrix(dp)
    hdu-5780 gcd(数学)
    hdu-5778 abs(暴力枚举)
    hdu-5777 domino(贪心)
    hdu-5776 sum(同余)
    polymer-quick tour of polymer
    polymer-developer guide-feature overview
    polymer技巧
    polymer入门例子-已过时
    polymer-developer guide-registration and lifecycle
  • 原文地址:https://www.cnblogs.com/feijian/p/6247952.html
Copyright © 2011-2022 走看看