如果前进与后退按钮上只显示指示图标,用户界面更清爽
activity_quiz.xml修改部分
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<ImageButton
android:id="@+id/pre_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/arrow_left"
/>
<ImageButton
android:id="@+id/next_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/arrow_right"
/>
</LinearLayout>
QuizActivity部分
private ImageButton mNextButton;
private ImageButton mPrevButton;
mPrevButton = (ImageButton)findViewById(R.id.pre_button);
mNextButton = (ImageButton)findViewById(R.id.next_button);