1、继承关系和子类:
2、定义:
mageButton就是用一个图标代表了一些文字的Button,它没Android:text属性。它由Android:src指定图标的位置
android:src="@drawable/back_48",其他属性都和Button差不多。
3、XML重要属性:
参考 Button Attributes, View Attributes
android:src="@drawable/xmlbtnback" 将src设置为前面定义好的xml布局
4、重要方法:
5、实战:
布局文件
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.imageswitcherdemo.MainActivity" ></