| <?xml version="1.0" encoding="utf-8"?> | 
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | 
|     xmlns:app="http://schemas.android.com/apk/res-auto" | 
|     android:id="@+id/activity_main" | 
|     android:layout_width="match_parent" | 
|     android:layout_height="match_parent" | 
|     android:background="@color/colorBackground"> | 
|   | 
|     <com.dayu.baselibrary.view.TitleBar | 
|         android:id="@+id/titleBar" | 
|         android:layout_width="match_parent" | 
|         android:layout_height="@dimen/dimen_title_height" | 
|         android:background="@color/title_bar_bg" | 
|         app:centerText="写卡" | 
|         app:leftImage="@mipmap/icon_back" /> | 
|   | 
|   | 
|     <TextView | 
|         android:id="@+id/cardData" | 
|         android:layout_width="match_parent" | 
|         android:layout_height="wrap_content" | 
|         android:layout_below="@id/titleBar" | 
|         android:gravity="center" | 
|         android:layout_marginTop="20dp" | 
|         android:textSize="@dimen/text_size" /> | 
|   | 
|   | 
|     <TextView | 
|         android:id="@+id/textView" | 
|         android:layout_width="match_parent" | 
|         android:layout_height="wrap_content" | 
|         android:layout_below="@id/cardData" | 
|         android:layout_marginTop="20dp" | 
|         android:gravity="center" | 
|         android:text="请将卡贴在设备顶部进行写卡" | 
|         android:textSize="@dimen/text_size" /> | 
|   | 
|   | 
|     <ImageView | 
|         android:layout_width="match_parent" | 
|         android:layout_height="match_parent" | 
|         android:layout_below="@id/textView" | 
|         android:scaleType="center" | 
|         android:src="@mipmap/nfc_write" /> | 
|   | 
|     <com.wang.avi.AVLoadingIndicatorView | 
|         android:id="@+id/avi" | 
|         style="@style/AVLoadingIndicatorView" | 
|         android:layout_width="80dp" | 
|         android:layout_height="80dp" | 
|         android:layout_centerHorizontal="true" | 
|         android:layout_centerVertical="true" | 
|         android:visibility="gone" | 
|         app:indicatorColor="@color/title_bg" | 
|         app:indicatorName="BallClipRotatePulseIndicator" /> | 
| </RelativeLayout> |