安卓中带有进度条效果的按钮,如下图:
1.布局文件如下activity_main.xml
1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2 xmlns:tools="http://schemas.android.com/tools"
3 android:layout_width="fill_parent"
4 android:layout_height="fill_parent"
5 android:paddingBottom="@dimen/activity_vertical_margin"
6 android:paddingLeft="@dimen/activity_horizontal_margin"
7 android:paddingRight="@dimen/activity_horizontal_margin"
8 android:paddingTop="@dimen/activity_vertical_margin"
9 tools:context=".MainActivity" >
10
11 <TextView
12 android:id="@+id/text"
13 android:layout_width="wrap_content"
14 android:layout_height="wrap_content"
15 android:text="带有进度条的Button" />
16
17 <RelativeLayout
18 android:layout_width="fill_parent"
19 android:layout_height="50dp"
20 android:layout_centerHorizontal="true"
21 android:layout_centerVertical="true"
22 android:gravity="bottom" >