瀏覽代碼

Add share dialog xml layout

Wayne 6 年之前
父節點
當前提交
04fcb42da3

+ 1 - 0
build.gradle

@@ -47,6 +47,7 @@ dependencies {
     implementation project(':Bomo_for_Android_trackWidgetModule')
     implementation project(':Bomo_for_Android_cloudModule')
     implementation project(':Bomo_for_Android_encodeModule')
+    implementation project(':uikit')
 }
 repositories {
     mavenCentral()

+ 5 - 0
src/main/res/drawable/bg_rounded_8dp.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@android:color/transparent" />
+    <corners android:radius="8dp" />
+</shape>

文件差異過大導致無法顯示
+ 38 - 0
src/main/res/drawable/ic_btn_bomo_01.xml


+ 18 - 0
src/main/res/drawable/ic_btn_facebook_01.xml

@@ -0,0 +1,18 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="48"
+    android:viewportHeight="48">
+    <path
+        android:fillColor="#00000000"
+        android:fillType="evenOdd"
+        android:pathData="M24,24m-19.5,0a19.5,19.5 0,1 1,39 0a19.5,19.5 0,1 1,-39 0"
+        android:strokeWidth="1"
+        android:strokeColor="#4E342E" />
+    <path
+        android:fillColor="#4E342E"
+        android:fillType="evenOdd"
+        android:pathData="M25.5469,33.9844L21.8438,33.9844L21.8438,24.8906L18.75,24.8906L18.75,21.3281L21.8438,21.3281L21.8438,18.7031C21.8438,17.2031 22.2656,16.0469 23.1094,15.2344C23.9531,14.4219 25.0781,14.0156 26.4844,14.0156C27.6094,14.0156 28.5312,14.0625 29.25,14.1563L29.25,17.2969L27.3281,17.3438C26.6406,17.3438 26.1719,17.4844 25.9219,17.7656C25.6719,18.0469 25.5469,18.4687 25.5469,19.0313L25.5469,21.3281L29.1094,21.3281L28.6406,24.8906L25.5469,24.8906L25.5469,33.9844Z"
+        android:strokeWidth="1"
+        android:strokeColor="#00000000" />
+</vector>

文件差異過大導致無法顯示
+ 18 - 0
src/main/res/drawable/ic_btn_more_01.xml


文件差異過大導致無法顯示
+ 18 - 0
src/main/res/drawable/ic_btn_twitter_01.xml


文件差異過大導致無法顯示
+ 18 - 0
src/main/res/drawable/ic_btn_youtube_01.xml


+ 20 - 0
src/main/res/drawable/ic_cover.xml

@@ -0,0 +1,20 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path
+        android:fillAlpha="0.3"
+        android:fillColor="#4E342E"
+        android:fillType="nonZero"
+        android:pathData="M13,13l-3,-2.25l-3,2.25l0,-9l-1,0l0,16l12,0l0,-16l-5,0z"
+        android:strokeWidth="1"
+        android:strokeAlpha="0.3"
+        android:strokeColor="#00000000" />
+    <path
+        android:fillColor="#4E342E"
+        android:fillType="nonZero"
+        android:pathData="M18,2L6,2C4.9,2 4,2.9 4,4L4,20C4,21.1 4.9,22 6,22L18,22C19.1,22 20,21.1 20,20L20,4C20,2.9 19.1,2 18,2ZM9,4L11,4L11,9L10,8.25L9,9L9,4ZM18,20L6,20L6,4L7,4L7,13L10,10.75L13,13L13,4L18,4L18,20Z"
+        android:strokeWidth="1"
+        android:strokeColor="#00000000" />
+</vector>

+ 9 - 0
src/main/res/drawable/ic_cover_36dp.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item
+        android:width="36dp"
+        android:height="36dp"
+        android:drawable="@drawable/ic_cover" />
+
+</layer-list>

+ 32 - 0
src/main/res/drawable/ic_exportpdf.xml

@@ -0,0 +1,32 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path
+        android:fillAlpha="0.3"
+        android:fillColor="#4E342E"
+        android:fillType="nonZero"
+        android:pathData="M13,4L6,4L6,20L18,20L18,9L13,9L13,4ZM16,18L8,18L8,16L16,16L16,18ZM16,12L16,14L8,14L8,12L16,12Z"
+        android:strokeWidth="1"
+        android:strokeAlpha="0.3"
+        android:strokeColor="#00000000" />
+    <path
+        android:fillColor="#4E342E"
+        android:fillType="nonZero"
+        android:pathData="M8,16h8v2h-8z"
+        android:strokeWidth="1"
+        android:strokeColor="#00000000" />
+    <path
+        android:fillColor="#4E342E"
+        android:fillType="nonZero"
+        android:pathData="M8,12h8v2h-8z"
+        android:strokeWidth="1"
+        android:strokeColor="#00000000" />
+    <path
+        android:fillColor="#4E342E"
+        android:fillType="nonZero"
+        android:pathData="M14,2L6,2C4.9,2 4,2.9 4,4L4,20C4,21.1 4.89,22 5.99,22L18,22C19.1,22 20,21.1 20,20L20,8L14,2ZM18,20L6,20L6,4L13,4L13,9L18,9L18,20Z"
+        android:strokeWidth="1"
+        android:strokeColor="#00000000" />
+</vector>

+ 9 - 0
src/main/res/drawable/ic_exportpdf_36dp.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item
+        android:width="36dp"
+        android:height="36dp"
+        android:drawable="@drawable/ic_exportpdf" />
+
+</layer-list>

+ 5 - 1
src/main/res/drawable/ic_play.xml

@@ -6,11 +6,15 @@
   <path
       android:pathData="M10,8.64l0,6.72l5.27,-3.36z"
       android:strokeAlpha="0.3"
+      android:strokeWidth="1"
       android:fillColor="#4E342E"
       android:fillType="nonZero"
+      android:strokeColor="#00000000"
       android:fillAlpha="0.3"/>
   <path
       android:pathData="M8,19L19,12L8,5L8,19ZM10,8.64L15.27,12L10,15.36L10,8.64Z"
+      android:fillType="nonZero"
       android:fillColor="#4E342E"
-      android:fillType="nonZero"/>
+      android:strokeWidth="1"
+      android:strokeColor="#00000000" />
 </vector>

+ 34 - 0
src/main/res/drawable/ic_print.xml

@@ -0,0 +1,34 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path
+        android:fillAlpha="0.3"
+        android:fillColor="#4E342E"
+        android:fillType="nonZero"
+        android:pathData="M8,5h8v3h-8z"
+        android:strokeWidth="1"
+        android:strokeAlpha="0.3"
+        android:strokeColor="#00000000" />
+    <path
+        android:fillAlpha="0.3"
+        android:fillColor="#4E342E"
+        android:fillType="nonZero"
+        android:pathData="M6,13L18,13L18,15L20,15L20,11C20,10.45 19.55,10 19,10L18,10L6,10L5,10C4.45,10 4,10.45 4,11L4,15L6,15L6,13ZM18,10.5C18.55,10.5 19,10.95 19,11.5C19,12.05 18.55,12.5 18,12.5C17.45,12.5 17,12.05 17,11.5C17,10.95 17.45,10.5 18,10.5Z"
+        android:strokeWidth="1"
+        android:strokeAlpha="0.3"
+        android:strokeColor="#00000000" />
+    <path
+        android:fillColor="#4E342E"
+        android:fillType="nonZero"
+        android:pathData="M18,11.5m-1,0a1,1 0,1 1,2 0a1,1 0,1 1,-2 0"
+        android:strokeWidth="1"
+        android:strokeColor="#00000000" />
+    <path
+        android:fillColor="#4E342E"
+        android:fillType="nonZero"
+        android:pathData="M19,8L18,8L18,3L6,3L6,8L5,8C3.34,8 2,9.34 2,11L2,15L2,17L6,17L6,21L18,21L18,17L22,17L22,15L22,11C22,9.34 20.66,8 19,8ZM8,5L16,5L16,8L8,8L8,5ZM16,19L8,19L8,15L16,15L16,19ZM20,15L18,15L18,13L6,13L6,15L4,15L4,11C4,10.45 4.45,10 5,10L6,10L18,10L19,10C19.55,10 20,10.45 20,11L20,15Z"
+        android:strokeWidth="1"
+        android:strokeColor="#00000000" />
+</vector>

+ 9 - 0
src/main/res/drawable/ic_print_36dp.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item
+        android:width="36dp"
+        android:height="36dp"
+        android:drawable="@drawable/ic_print" />
+
+</layer-list>

+ 206 - 0
src/main/res/layout/dialog_share.xml

@@ -0,0 +1,206 @@
+<?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_shareDialog_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_shareDialog_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        android:fontFamily="sans-serif"
+        android:gravity="center_horizontal"
+        android:textColor="#de000000"
+        android:textSize="20sp"
+        android:textStyle="normal"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:text="The frog king or Iron Henry" />
+
+    <TextView
+        android:id="@+id/tv_shareDialog_author"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:fontFamily="sans-serif"
+        android:gravity="center_horizontal"
+        android:textColor="#dd000000"
+        android:textSize="14sp"
+        android:textStyle="normal"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/tv_shareDialog_name"
+        tools:text="by Alexander Wilson" />
+
+    <View
+        android:id="@+id/view_shareDialog_preview"
+        android:layout_width="560dp"
+        android:layout_height="280dp"
+        android:layout_marginTop="24dp"
+        android:background="@color/cocoa"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/view_shareDialog_header" />
+
+    <TextView
+        android:id="@+id/tv_shareDialog_editCover"
+        style="@style/Body2"
+        android:layout_width="104dp"
+        android:layout_height="72dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="16dp"
+        android:drawableTop="@drawable/ic_cover_36dp"
+        android:drawablePadding="8dp"
+        android:gravity="center"
+        android:text="@string/share_dialog_edit_cover"
+        app:layout_constraintBottom_toTopOf="@id/tv_shareDialog_exportPdf"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toLeftOf="@id/view_shareDialog_preview"
+        app:layout_constraintTop_toTopOf="@id/view_shareDialog_preview" />
+
+    <TextView
+        android:id="@+id/tv_shareDialog_exportPdf"
+        style="@style/Body2"
+        android:layout_width="104dp"
+        android:layout_height="72dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="16dp"
+        android:drawableTop="@drawable/ic_exportpdf_36dp"
+        android:drawablePadding="8dp"
+        android:gravity="center"
+        android:text="@string/share_dialog_export_pdf"
+        app:layout_constraintBottom_toTopOf="@id/tv_shareDialog_print"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toLeftOf="@id/view_shareDialog_preview"
+        app:layout_constraintTop_toBottomOf="@id/tv_shareDialog_editCover" />
+
+    <TextView
+        android:id="@+id/tv_shareDialog_print"
+        style="@style/Body2"
+        android:layout_width="104dp"
+        android:layout_height="72dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="16dp"
+        android:drawableTop="@drawable/ic_print_36dp"
+        android:drawablePadding="8dp"
+        android:gravity="center"
+        android:text="@string/share_dialog_print"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toLeftOf="@id/view_shareDialog_preview"
+        app:layout_constraintTop_toBottomOf="@id/tv_shareDialog_exportPdf" />
+
+    <ImageView
+        android:id="@+id/iv_shareDialog_bomo"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_marginLeft="36dp"
+        android:layout_marginRight="36dp"
+        android:src="@drawable/ic_btn_bomo_01"
+        app:layout_constraintLeft_toRightOf="@id/view_shareDialog_preview"
+        app:layout_constraintTop_toTopOf="@id/view_shareDialog_preview" />
+
+    <ImageView
+        android:id="@+id/iv_shareDialog_youtube"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_marginLeft="36dp"
+        android:layout_marginTop="16dp"
+        android:layout_marginRight="36dp"
+        android:src="@drawable/ic_btn_youtube_01"
+        app:layout_constraintLeft_toRightOf="@id/view_shareDialog_preview"
+        app:layout_constraintTop_toBottomOf="@id/iv_shareDialog_bomo" />
+
+    <ImageView
+        android:id="@+id/iv_shareDialog_facebook"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_marginLeft="36dp"
+        android:layout_marginTop="16dp"
+        android:layout_marginRight="36dp"
+        android:src="@drawable/ic_btn_facebook_01"
+        app:layout_constraintLeft_toRightOf="@id/view_shareDialog_preview"
+        app:layout_constraintTop_toBottomOf="@id/iv_shareDialog_youtube" />
+
+    <ImageView
+        android:id="@+id/iv_shareDialog_twitter"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_marginLeft="36dp"
+        android:layout_marginTop="16dp"
+        android:layout_marginRight="36dp"
+        android:src="@drawable/ic_btn_twitter_01"
+        app:layout_constraintLeft_toRightOf="@id/view_shareDialog_preview"
+        app:layout_constraintTop_toBottomOf="@id/iv_shareDialog_facebook" />
+
+    <ImageView
+        android:id="@+id/iv_shareDialog_more"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_marginLeft="36dp"
+        android:layout_marginTop="16dp"
+        android:layout_marginRight="36dp"
+        android:src="@drawable/ic_btn_more_01"
+        app:layout_constraintLeft_toRightOf="@id/view_shareDialog_preview"
+        app:layout_constraintTop_toBottomOf="@id/iv_shareDialog_twitter" />
+
+    <ImageView
+        android:id="@+id/iv_shareDialog_play"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_marginTop="8dp"
+        android:src="@drawable/ic_play"
+        app:layout_constraintLeft_toLeftOf="@id/view_shareDialog_preview"
+        app:layout_constraintTop_toBottomOf="@id/view_shareDialog_preview" />
+
+    <TextView
+        android:id="@+id/tv_shareDialog_time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:fontFamily="sans-serif-medium"
+        android:textColor="#4e342e"
+        android:textSize="16sp"
+        android:textStyle="normal"
+        app:layout_constraintBottom_toBottomOf="@id/iv_shareDialog_play"
+        app:layout_constraintRight_toRightOf="@id/view_shareDialog_preview"
+        app:layout_constraintTop_toTopOf="@id/iv_shareDialog_play"
+        tools:text="0:20/3:00" />
+
+    <SeekBar
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="16dp"
+        android:layout_marginRight="16dp"
+        android:progressTint="@color/cocoa"
+        android:thumbTint="@color/cocoa"
+        app:layout_constraintBottom_toBottomOf="@id/iv_shareDialog_play"
+        app:layout_constraintLeft_toRightOf="@id/iv_shareDialog_play"
+        app:layout_constraintRight_toLeftOf="@id/tv_shareDialog_time"
+        app:layout_constraintTop_toTopOf="@id/iv_shareDialog_play"
+        tools:progress="100" />
+
+    <View
+        android:id="@+id/view_shareDialog_scenes"
+        android:layout_width="560dp"
+        android:layout_height="88dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginBottom="24dp"
+        android:background="@color/pale_peach"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/iv_shareDialog_play" />
+</android.support.constraint.ConstraintLayout>

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

@@ -12,4 +12,8 @@
 
     <!-- TODO: Remove or change this placeholder text -->
     <string name="hello_blank_fragment">Hello blank fragment</string>
+
+    <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>
 </resources>