Android ApiDemos示例解析(183):Views->Progress Bar->2. Smooth
2012-10-04 09:35
435 查看
本例介绍了ProgressBar 采用”indeterminate” 模式上几种不同的风格,在progressbar_2.xml 中添加一个使用水平滚动条的”indeterminate” 模式。
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:orientation=”vertical”
android:layout_width=”match_parent”
android:layout_height=”wrap_content”>
<ProgressBar android:id=”@+android:id/progress_large”
style=”?android:attr/progressBarStyleLarge”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />
<ProgressBar android:id=”@+android:id/progress”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />
<ProgressBar android:id=”@+android:id/progress_small”
style=”?android:attr/progressBarStyleSmall”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />
<ProgressBar android:id=”@+android:id/progress_small_title”
style=”?android:attr/progressBarStyleSmallTitle”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />
<ProgressBar
android:indeterminate =”true”
style=”?android:attr/progressBarStyleHorizontal”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />
</LinearLayout>
![](http://www.imobilebbs.com/wordpress/wp-content/uploads/2011/07/20110717002.png)
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:orientation=”vertical”
android:layout_width=”match_parent”
android:layout_height=”wrap_content”>
<ProgressBar android:id=”@+android:id/progress_large”
style=”?android:attr/progressBarStyleLarge”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />
<ProgressBar android:id=”@+android:id/progress”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />
<ProgressBar android:id=”@+android:id/progress_small”
style=”?android:attr/progressBarStyleSmall”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />
<ProgressBar android:id=”@+android:id/progress_small_title”
style=”?android:attr/progressBarStyleSmallTitle”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />
<ProgressBar
android:indeterminate =”true”
style=”?android:attr/progressBarStyleHorizontal”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />
</LinearLayout>
![](http://www.imobilebbs.com/wordpress/wp-content/uploads/2011/07/20110717002.png)
相关文章推荐
- Android ApiDemos示例解析(182):Views->Progress Bar->1. Incremental
- Android ApiDemos示例解析(184):Views->Progress Bar->3. Dialogs
- Android ApiDemos示例解析(185):Views->Progress Bar->4. In Title Bar
- Android ApiDemos示例解析(115):Views->Focus->1. Vertical
- Android ApiDemos示例解析(120):Views->Gallery->2. People
- Android ApiDemos示例解析(180):Views->Lists->13. Slow Adapter
- Android ApiDemos示例解析(152):Views->Layouts->RelativeLayout->2.Simple Form
- Android ApiDemos示例解析(106):Views->Chronometer
- Android ApiDemos示例解析(191):Views->Seek Bar
- Android ApiDemos示例解析(116):Views->Focus->2. Horizontal
- Android ApiDemos示例解析(169):Views->Lists->2. Cursor(People)
- Android ApiDemos示例解析(153):Views->Layouts->ScrollView->1.Short
- Android ApiDemos示例解析(157):Views->Layouts->TableLayout->02. Empty Cells
- Android ApiDemos示例解析(117):Views->Focus->3. Circular
- Android ApiDemos示例解析(123):Views->ImageButton
- Android ApiDemos示例解析(189):Views->ScrollBars->2.Fancy
- Android ApiDemos示例解析(132):Views->Layout Animation->7. Nested Animations
- Android ApiDemos示例解析(127):Views->Layout Animation->2. List Cascade
- Android ApiDemos示例解析(154):Views->Layouts->ScrollView->2. Long
- Android ApiDemos示例解析(131):Views->Layout Animation->6. Wave Scale