Browse Source

Add export pdf dialog layout(xml)

Wayne 6 years ago
parent
commit
e1c97ec02b

File diff suppressed because it is too large
+ 475 - 0
src/main/res/drawable/ic_img_foldable.xml


+ 140 - 0
src/main/res/layout/dialog_export_pdf.xml

@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="800dp"
+    android:layout_height="544dp"
+    android:background="@drawable/bg_rounded_8dp"
+    android:elevation="8dp">
+
+    <View
+        android:id="@+id/view_exportPdfDialog_header"
+        android:layout_width="0dp"
+        android:layout_height="64dp"
+        android:background="@color/pale_peach"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/tv_exportPdfDialog_name"
+        style="@style/Title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textColor="@color/cocoa"
+        app:layout_constraintBottom_toBottomOf="@id/view_exportPdfDialog_header"
+        app:layout_constraintLeft_toLeftOf="@id/view_exportPdfDialog_header"
+        app:layout_constraintRight_toRightOf="@id/view_exportPdfDialog_header"
+        app:layout_constraintTop_toTopOf="@id/view_exportPdfDialog_header"
+        tools:text="Choose PDF Format" />
+
+    <RadioButton
+        android:id="@+id/rb_exportPdfDialog_standard"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="52dp"
+        android:layout_marginTop="48dp"
+        android:buttonTint="@color/cocoa"
+        android:checked="true"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/view_exportPdfDialog_header" />
+
+    <TextView
+        android:id="@+id/tv_exportPdfDialog_standard"
+        style="@style/Body1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="36dp"
+        android:text="@string/export_pdf_dialog_radio_standard"
+        android:textColor="@color/cocoa"
+        app:layout_constraintBottom_toBottomOf="@id/rb_exportPdfDialog_standard"
+        app:layout_constraintLeft_toRightOf="@id/rb_exportPdfDialog_standard"
+        app:layout_constraintTop_toTopOf="@id/rb_exportPdfDialog_standard" />
+
+    <ImageView
+        android:id="@+id/iv_exportPdfDialog_standard_1"
+        android:layout_width="144dp"
+        android:layout_height="72dp"
+        android:layout_marginTop="24dp"
+        android:scaleType="centerCrop"
+        app:layout_constraintLeft_toLeftOf="@id/tv_exportPdfDialog_standard"
+        app:layout_constraintTop_toBottomOf="@id/tv_exportPdfDialog_standard" />
+
+    <ImageView
+        android:id="@+id/iv_exportPdfDialog_standard_2"
+        android:layout_width="144dp"
+        android:layout_height="72dp"
+        android:layout_marginLeft="16dp"
+        android:scaleType="centerCrop"
+        app:layout_constraintLeft_toRightOf="@id/iv_exportPdfDialog_standard_1"
+        app:layout_constraintTop_toTopOf="@id/iv_exportPdfDialog_standard_1" />
+
+    <ImageView
+        android:id="@+id/iv_exportPdfDialog_standard_3"
+        android:layout_width="144dp"
+        android:layout_height="72dp"
+        android:layout_marginLeft="16dp"
+        android:scaleType="centerCrop"
+        app:layout_constraintLeft_toRightOf="@id/iv_exportPdfDialog_standard_2"
+        app:layout_constraintTop_toTopOf="@id/iv_exportPdfDialog_standard_2" />
+
+    <RadioButton
+        android:id="@+id/rb_exportPdfDialog_foldableBooklet"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="52dp"
+        android:layout_marginTop="136dp"
+        android:buttonTint="@color/cocoa"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/rb_exportPdfDialog_standard" />
+
+    <TextView
+        android:id="@+id/tv_exportPdfDialog_foldableBooklet"
+        style="@style/Body1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="36dp"
+        android:text="@string/export_pdf_dialog_radio_foldable_booklet"
+        android:textColor="@color/cocoa"
+        app:layout_constraintBottom_toBottomOf="@id/rb_exportPdfDialog_foldableBooklet"
+        app:layout_constraintLeft_toRightOf="@id/rb_exportPdfDialog_foldableBooklet"
+        app:layout_constraintTop_toTopOf="@id/rb_exportPdfDialog_foldableBooklet" />
+
+    <ImageView
+        android:id="@+id/iv_exportPdfDialog_foldableBooklet_1"
+        android:layout_width="144dp"
+        android:layout_height="72dp"
+        android:layout_marginTop="24dp"
+        android:scaleType="centerCrop"
+        app:layout_constraintLeft_toLeftOf="@id/tv_exportPdfDialog_foldableBooklet"
+        app:layout_constraintTop_toBottomOf="@id/tv_exportPdfDialog_foldableBooklet" />
+
+    <ImageView
+        android:id="@+id/iv_exportPdfDialog_foldableBooklet_2"
+        android:layout_width="488dp"
+        android:layout_height="120dp"
+        android:layout_marginLeft="16dp"
+        android:scaleType="centerCrop"
+        android:src="@drawable/ic_img_foldable"
+        app:layout_constraintLeft_toRightOf="@id/iv_exportPdfDialog_foldableBooklet_1"
+        app:layout_constraintTop_toTopOf="@id/iv_exportPdfDialog_foldableBooklet_1" />
+
+    <Button
+        android:id="@+id/btn_exportPdfDialog_print"
+        style="@style/Widget.AppCompat.Button.Borderless.Colored"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/export_pdf_dialog_print"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toRightOf="parent" />
+
+    <Button
+        android:id="@+id/btn_exportPdfDialog_cancel"
+        style="@style/Widget.AppCompat.Button.Borderless.Colored"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="8dp"
+        android:text="@string/export_pdf_dialog_cancel"
+        app:layout_constraintBottom_toBottomOf="@id/btn_exportPdfDialog_print"
+        app:layout_constraintRight_toLeftOf="@id/btn_exportPdfDialog_print" />
+</android.support.constraint.ConstraintLayout>

+ 6 - 0
src/main/res/values/strings.xml

@@ -16,4 +16,10 @@
     <string name="share_dialog_edit_cover">Edit Cover</string>
     <string name="share_dialog_export_pdf">Export PDF</string>
     <string name="share_dialog_print">Print</string>
+
+    <string name="export_pdf_dialog_title">Choose PDF format</string>
+    <string name="export_pdf_dialog_radio_standard">Standard PDF</string>
+    <string name="export_pdf_dialog_radio_foldable_booklet">Foldable Booklet</string>
+    <string name="export_pdf_dialog_print">Print</string>
+    <string name="export_pdf_dialog_cancel">Cancel</string>
 </resources>