展会信息港展会大全

Android 几种 PROGRESSBAR的属性(进度条)
来源:互联网   发布日期:2015-10-03 10:58:42   浏览:1527次  

导读:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/a...

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="vertical" >

<TextView

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/hello" />

//风格为大圆形进度条

<ProgressBar

android:id="@+id/progressBar1"

style="?android:attr/progressBarStyleLarge"

android:layout_width="wrap_content"

android:layout_height="wrap_content" />

//正常圆形进度条

<ProgressBar

android:id="@+id/progressBar2"

android:layout_width="wrap_content"

android:layout_height="wrap_content" />

//小圆形进度条

<ProgressBar

android:id="@+id/progressBar3"

style="?android:attr/progressBarStyleSmall"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:indeterminate="true" />

//横向进度条为可以添加indeterminate属性,圆形添加则没有效果

<ProgressBarwww.2cto.com

android:id="@+id/progressBar4"

style="?android:attr/progressBarStyleHorizontal"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:indeterminate="true" />

//横向进度条的进度状态

<ProgressBar

android:id="@+id/progressBar4"

style="?android:attr/progressBarStyleHorizontal"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:max="1000"

android:progress="200"

android:secondaryProgress="500" />

</LinearLayout>

作者:gongzibai

赞助本站

人工智能实验室

相关热词: android开发 教程

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港