1.布局
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Regular sized buttons -->
<Button android:id="@+id/button_normal"
android:text="buttons_1_normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<!-- Small buttons -->
<Button android:id="@+id/button_small"
style="?android:attr/buttonStyleSmall"
android:text="buttons_1_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ToggleButton android:id="@+id/button_toggle"
android:text="buttons_1_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
2. 效果