app简单控件了解——图像按钮——图像按钮ImageButton
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageButton android:layout_width="match_parent" android:layout_height="80dp" android:src="@drawable/sqrt" android:scaleType="fitCenter" /> </LinearLayout>
代码没变: