zoukankan      html  css  js  c++  java
  • Android之ProgressBar

      设置水平ProgressBar的背景

        在drawable 建xml文件

          

    <?xml version="1.0" encoding="utf-8"?>
    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
        <item
            android:id="@android:id/background"
            android:drawable="@drawable/bar_bg">
    
        </item>
    
        <item
            android:id="@android:id/secondaryProgress"
            android:drawable="@drawable/auth_begin_n">
        </item>
    
        <item
            android:id="@android:id/progress"
            android:drawable="@drawable/auth_begin_p">'
        </item>
    </layer-list>

          层次关系如上,顺序很重要

        

        在控件中添加以下属性

         android:progressDrawable="@drawable/bar_color"

        注意:

          背景用颜色,容易覆盖,建议使用图片

          

  • 相关阅读:
    7、shell函数
    5、shell分支
    6、shell循环
    4、shell中的test命令
    3、shell中引号
    2、shell变量
    1、建立和运行shell
    awk命令简介
    18、异步IO
    Python模块:sys
  • 原文地址:https://www.cnblogs.com/Free-Wind/p/4653420.html
Copyright © 2011-2022 走看看