Browse Source

New: music edit dialog xml content

Shan-PC\Shan 6 năm trước cách đây
mục cha
commit
5683bfff97

+ 32 - 0
src/main/res/drawable/ic_volume_up.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:pathData="M5,13l2.83,0l2.17,2.17l0,-6.34l-2.17,2.17l-2.83,0z"
+      android:strokeAlpha="0.3"
+      android:strokeWidth="1"
+      android:fillColor="#4E342E"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M3,9L3,15L7,15L12,20L12,4L7,9L3,9ZM10,8.83L10,15.17L7.83,13L5,13L5,11L7.83,11L10,8.83Z"
+      android:strokeWidth="1"
+      android:fillColor="#4E342E"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M14,7.97L14,16.02C15.48,15.29 16.5,13.77 16.5,12C16.5,10.23 15.48,8.71 14,7.97Z"
+      android:strokeWidth="1"
+      android:fillColor="#4E342E"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M14,3.23L14,5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.85 14,18.71L14,20.77C18.01,19.86 21,16.28 21,12C21,7.72 18.01,4.14 14,3.23Z"
+      android:strokeWidth="1"
+      android:fillColor="#4E342E"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 141 - 6
src/main/res/layout/fragment_music_edit_dialog.xml

@@ -1,13 +1,148 @@
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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="match_parent"
     android:layout_height="match_parent"
     tools:context="com.bomostory.sceneeditmodule.MusicEditDialog">
 
-    <!-- TODO: Update blank fragment layout -->
     <TextView
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:text="@string/hello_blank_fragment" />
+        android:id="@+id/musicName"
+        style="@style/TextAppearance.AppCompat.Title"
+        android:layout_width="800dp"
+        android:layout_height="64dp"
+        android:background="#ffecb3"
+        android:gravity="center" />
 
-</FrameLayout>
+    <TextView
+        android:id="@+id/musicLength"
+        style="@style/TextAppearance.AppCompat.Body2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="40dp"
+        android:layout_marginTop="88dp"
+        android:text="@string/music_length"
+        android:textColor="#80000000"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageButton
+        android:layout_width="24dp"
+        android:layout_height="24dp"
+        android:layout_marginStart="52dp"
+        android:layout_marginTop="169dp"
+        android:src="@drawable/ic_pause"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.example.audiotrack.EditAudioTrackView
+        android:id="@+id/editAudioTrackView"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="68dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginEnd="8dp"
+        android:background="#99ff8cd2"
+        app:borderColor="#633150"
+        app:dialogTextSize="16sp"
+        app:endDrawable="@drawable/ic_arrow_right_b"
+        app:headDrawable="@drawable/ic_arrow_left_b"
+        app:innerColor="#ff8cd2"
+        app:innerHeight="40dp"
+        app:innerWidthRatio="1"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/musicLength"
+        app:playProgress=".5"
+        app:playProgressDialogColor="@android:color/holo_orange_light"
+        app:playProgressText="0:20"
+        app:scrollProgressDialogColor="@android:color/holo_orange_dark"
+        app:scrollProgressText="0:30" />
+
+    <TextView
+        android:id="@+id/startTime"
+        style="@style/TextAppearance.AppCompat.Body2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="100dp"
+        android:textColor="#66000000"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/editAudioTrackView" />
+
+    <TextView
+        android:id="@+id/endTime"
+        style="@style/TextAppearance.AppCompat.Body2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="40dp"
+        android:textColor="#66000000"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/editAudioTrackView" />
+
+    <TextView
+        style="@style/TextAppearance.AppCompat.Body2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="40dp"
+        android:layout_marginTop="34dp"
+        android:text="@string/volume"
+        android:textColor="#80000000"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/editAudioTrackView" />
+
+    <ImageView
+        android:layout_width="24dp"
+        android:layout_height="24dp"
+        android:layout_marginStart="52dp"
+        android:layout_marginTop="278dp"
+        android:src="@drawable/ic_volume_up"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <SeekBar
+        android:id="@+id/volumeSeekBar"
+        android:layout_width="560dp"
+        android:layout_height="48dp"
+        android:layout_marginStart="108dp"
+        android:layout_marginTop="266dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/volumeText"
+        style="@style/TextAppearance.AppCompat.Body1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="281dp"
+        android:layout_marginEnd="40dp"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <Button
+        android:id="@+id/save"
+        style="@style/TextAppearance.AppCompat.Button"
+        android:layout_width="72dp"
+        android:layout_height="36dp"
+        android:layout_marginTop="346dp"
+        android:layout_marginEnd="24dp"
+        android:layout_marginBottom="24dp"
+        android:background="@null"
+        android:text="@string/save"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <Button
+        android:id="@+id/cancel"
+        style="@style/TextAppearance.AppCompat.Button"
+        android:layout_width="72dp"
+        android:layout_height="36dp"
+        android:layout_marginTop="346dp"
+        android:layout_marginEnd="104dp"
+        android:layout_marginBottom="24dp"
+        android:background="@null"
+        android:text="@string/cancel"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+</android.support.constraint.ConstraintLayout>

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

@@ -5,6 +5,11 @@
     <string name="dummy_button">Dummy Button</string>
     <string name="dummy_content">DUMMY\nCONTENT</string>
 
+    <string name="music_length">Music Length</string>
+    <string name="volume">Volume</string>
+    <string name="save">Save</string>
+    <string name="cancel">Cancel</string>
+
     <!-- TODO: Remove or change this placeholder text -->
     <string name="hello_blank_fragment">Hello blank fragment</string>
 </resources>