<?xml version="1.0" encoding="utf-8"?> <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/dp_10" app:cardCornerRadius="@dimen/dp_10"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white" android:gravity="center" android:orientation="vertical"> <TextView android:id="@+id/dialogTitleView" android:layout_width="match_parent" android:layout_height="wrap_content" android:fontFamily="sans-serif-medium" android:gravity="center_horizontal" android:paddingVertical="@dimen/dp_10" android:text="@string/app_name" android:textColor="@color/mainTextColor" android:textSize="@dimen/sp_16" /> <View android:layout_width="match_parent" android:layout_height="@dimen/lineViewSize" android:background="@color/hintTextColor" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/dp_10" android:src="@drawable/ic_no_network" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingVertical="@dimen/dp_10" android:text="未发现网络,内容走丢了..." android:textColor="@color/hintTextColor" android:textSize="@dimen/sp_14" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <Button android:id="@+id/dialogButton" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg_button" android:gravity="center" android:text="去设置网络" android:textColor="@color/mainThemeColor" android:textSize="@dimen/sp_16" /> </LinearLayout> </androidx.cardview.widget.CardView>