Skip to content

Commit

Permalink
增加边距
Browse files Browse the repository at this point in the history
  • Loading branch information
HuanTanSheng committed Aug 11, 2020
1 parent c263e4c commit 6b4f227
Showing 1 changed file with 57 additions and 51 deletions.
108 changes: 57 additions & 51 deletions toastdialog/src/main/res/layout/toast_dialog_action.xml
Original file line number Diff line number Diff line change
@@ -1,60 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:paddingTop="8dp"
android:background="@drawable/bg_toast_dialog_action">
android:layout_height="wrap_content">


<TextView
android:id="@+id/tv_msg"
android:layout_width="wrap_content"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center"
android:paddingStart="16dp"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:background="@drawable/bg_toast_dialog_action"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:text="退出程序?"
android:textColor="@color/toast_dialog_text"
android:textSize="16sp" />
android:paddingBottom="8dp">

<TextView
android:id="@+id/tv_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/tv_ok"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_toStartOf="@+id/tv_ok"
android:layout_toLeftOf="@+id/tv_ok"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:text="取消"
android:textColor="@color/toast_dialog_text"
android:textSize="14sp" />

<TextView
android:id="@+id/tv_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_msg"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginTop="20dp"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:text="确定"
android:textColor="@color/toast_dialog_text"
android:textSize="14sp"
android:textStyle="bold" />
</RelativeLayout>
<TextView
android:id="@+id/tv_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:text="退出程序?"
android:textColor="@color/toast_dialog_text"
android:textSize="16sp" />

<TextView
android:id="@+id/tv_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/tv_ok"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_toStartOf="@+id/tv_ok"
android:layout_toLeftOf="@+id/tv_ok"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:text="取消"
android:textColor="@color/toast_dialog_text"
android:textSize="14sp" />

<TextView
android:id="@+id/tv_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_msg"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginTop="20dp"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:text="确定"
android:textColor="@color/toast_dialog_text"
android:textSize="14sp"
android:textStyle="bold" />
</RelativeLayout>

</FrameLayout>

0 comments on commit 6b4f227

Please sign in to comment.