主布局文件:
<?xml version="1.0" encoding="utf-8"?>
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<Button
android:id="@+id/btn_retry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/selector"
android:text="加载失败,请重试"
android:textColor="#000" />
selector文件:
其中btn_pressed btn_normal 是两张.9图