Ver código fonte

Refactor: create screen package for project structure

liweihao 6 anos atrás
pai
commit
355c2e5432
33 arquivos alterados com 49 adições e 58 exclusões
  1. 1 1
      src/androidTest/java/com/bomostory/sceneeditmodule/ExportMovieFilmsTest.kt
  2. 1 1
      src/main/AndroidManifest.xml
  3. 5 5
      src/main/java/com/bomostory/sceneeditmodule/SceneEditActivity.kt
  4. 1 1
      src/main/java/com/bomostory/sceneeditmodule/SuperMovieMaker.kt
  5. 1 6
      src/main/java/com/bomostory/sceneeditmodule/navigationbar/actor/ActorAdapter.kt
  6. 1 1
      src/main/java/com/bomostory/sceneeditmodule/sceneview/OnTouchBoMoSceneListener.kt
  7. 1 1
      src/main/java/com/bomostory/sceneeditmodule/sceneview/OnTouchSceneListener.kt
  8. 1 1
      src/main/java/com/bomostory/sceneeditmodule/sceneview/SceneView1.kt
  9. 7 3
      src/main/java/com/bomostory/sceneeditmodule/MovieEditActivity.kt
  10. 1 1
      src/main/java/com/bomostory/sceneeditmodule/MusicEditDialog.kt
  11. 1 1
      src/main/java/com/bomostory/sceneeditmodule/MusicSelectDialog.kt
  12. 1 1
      src/main/java/com/bomostory/sceneeditmodule/MusicSelectFragment.kt
  13. 1 4
      src/main/java/com/bomostory/sceneeditmodule/view/ActorView.kt
  14. 1 1
      src/main/java/com/bomostory/sceneeditmodule/view/AudioTrackGroupView.kt
  15. 1 1
      src/main/java/com/bomostory/sceneeditmodule/view/CollapsedBar.kt
  16. 1 1
      src/main/java/com/bomostory/sceneeditmodule/view/DialogueView.kt
  17. 1 1
      src/main/java/com/bomostory/sceneeditmodule/view/EditActorView.kt
  18. 1 3
      src/main/java/com/bomostory/sceneeditmodule/view/LayerView.kt
  19. 1 1
      src/main/java/com/bomostory/sceneeditmodule/view/MovieEditBtnPanelView.kt
  20. 1 2
      src/main/java/com/bomostory/sceneeditmodule/view/MovieEditView.kt
  21. 1 1
      src/main/java/com/bomostory/sceneeditmodule/view/MovieSeekView.kt
  22. 1 3
      src/main/java/com/bomostory/sceneeditmodule/view/MovieSelectView.kt
  23. 1 1
      src/main/java/com/bomostory/sceneeditmodule/view/MovieView.kt
  24. 1 1
      src/main/java/com/bomostory/sceneeditmodule/view/ProgressView.kt
  25. 4 4
      src/main/res/layout/activity_movie_edit.xml
  26. 1 1
      src/main/res/layout/activity_scene_edit.xml
  27. 1 1
      src/main/res/layout/actor_view.xml
  28. 1 1
      src/main/res/layout/audio_track_group_view.xml
  29. 1 1
      src/main/res/layout/dialog_share.xml
  30. 1 1
      src/main/res/layout/fragment_music_edit_dialog.xml
  31. 1 1
      src/main/res/layout/fragment_music_select.xml
  32. 4 4
      src/main/res/layout/movie_edit_view.xml
  33. 1 1
      src/main/res/layout/movie_select_view.xml

+ 1 - 1
src/androidTest/java/com/bomostory/sceneeditmodule/ExportMovieFilmsTest.kt

@@ -7,7 +7,7 @@ import android.graphics.Canvas
 import android.graphics.Paint
 import android.support.test.InstrumentationRegistry
 import android.support.test.rule.GrantPermissionRule
-import com.bomostory.sceneeditmodule.MovieEditActivity.Companion.FPS
+import com.bomostory.sceneeditmodule.screen.movie.MovieEditActivity.Companion.FPS
 import com.bomostory.sceneeditmodule.basicdata.Scene
 import com.bomostory.sceneeditmodule.basicdata.Story
 import com.example.exportmedia.MediaHelper

+ 1 - 1
src/main/AndroidManifest.xml

@@ -14,7 +14,7 @@
             android:name=".SceneEditActivity"
             android:screenOrientation="landscape"></activity>
         <activity
-            android:name="com.bomostory.sceneeditmodule.MovieEditActivity"
+            android:name="com.bomostory.sceneeditmodule.screen.movie.MovieEditActivity"
             android:configChanges="orientation|keyboardHidden|screenSize"
             android:screenOrientation="landscape"
             android:label="@string/title_activity_movie_edit" />

+ 5 - 5
src/main/java/com/bomostory/sceneeditmodule/SceneEditActivity.kt

@@ -22,15 +22,15 @@ import com.google.gson.Gson
 import kotlinx.android.synthetic.main.activity_scene_edit.*
 import com.bomostory.sceneeditmodule.basicdata.*
 import com.bomostory.sceneeditmodule.navigationbar.dialogue.DialogueView
-import com.bomostory.sceneeditmodule.view.EditActorView
-import com.bomostory.sceneeditmodule.view.OnTouchBoMoSceneListener
+import com.bomostory.sceneeditmodule.screen.view.EditActorView
+import com.bomostory.sceneeditmodule.screen.view.OnTouchBoMoSceneListener
 import com.example.tfat.myapplication.navigationbar.actor.LayerManagementDialog
 import kotlinx.android.synthetic.main.control_actor_dialog.view.*
 import com.bomostory.sceneeditmodule.utils.FileUtils
-import com.bomostory.sceneeditmodule.view.LayerView
+import com.bomostory.sceneeditmodule.screen.view.LayerView
 import android.util.DisplayMetrics
-import com.bomostory.sceneeditmodule.MovieEditActivity
-import com.bomostory.sceneeditmodule.view.OnTouchSceneListener
+import com.bomostory.sceneeditmodule.screen.movie.MovieEditActivity
+import com.bomostory.sceneeditmodule.screen.view.OnTouchSceneListener
 import com.example.tfat.myapplication.navigationbar.EditSceneView
 import com.example.tfat.myapplication.navigationbar.RecordFinishView
 import io.reactivex.android.schedulers.AndroidSchedulers

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/SuperMovieMaker.kt

@@ -2,7 +2,7 @@ package com.bomostory.sceneeditmodule
 
 import android.graphics.Bitmap
 import android.util.Log
-import com.bomostory.sceneeditmodule.MovieEditActivity.Companion.FPS
+import com.bomostory.sceneeditmodule.screen.movie.MovieEditActivity.Companion.FPS
 import com.bomostory.sceneeditmodule.basicdata.Music
 import com.bomostory.sceneeditmodule.basicdata.Project
 import com.bomostory.sceneeditmodule.basicdata.Scene

+ 1 - 6
src/main/java/com/bomostory/sceneeditmodule/navigationbar/actor/ActorAdapter.kt

@@ -5,17 +5,12 @@ import android.content.ClipDescription
 import android.content.Context
 import android.graphics.drawable.Drawable
 import android.support.v7.widget.RecyclerView
-import android.util.Log
 import android.view.*
 import android.widget.ImageView
 import android.widget.LinearLayout
-import com.bomostory.sceneeditmodule.basicdata.Actor
-import com.bomostory.sceneeditmodule.basicdata.Layer
-import com.bomostory.sceneeditmodule.view.EditActorView
-import com.bomostory.sceneeditmodule.view.LayerView
+import com.bomostory.sceneeditmodule.screen.view.LayerView
 
 import com.example.tfat.myapplication.R
-import com.example.tfat.myapplication.SceneEditActivity
 import kotlin.collections.ArrayList
 
 class ActorAdapter(var context : Context, var data: ArrayList<ArrayList<String>>, layerView: LayerView, onActorDragListener: OnActorDragListener) : RecyclerView.Adapter<ActorAdapter.ViewHolder>() {

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/sceneview/OnTouchBoMoSceneListener.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.view.MotionEvent
 import android.view.View

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/sceneview/OnTouchSceneListener.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.view.MotionEvent
 import android.view.View

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/sceneview/SceneView1.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.graphics.drawable.Drawable

+ 7 - 3
src/main/java/com/bomostory/sceneeditmodule/MovieEditActivity.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule
+package com.bomostory.sceneeditmodule.screen.movie
 
 import android.app.AlertDialog
 import android.app.ProgressDialog
@@ -14,14 +14,18 @@ import android.view.View
 import android.widget.CompoundButton
 import android.widget.SeekBar
 import android.widget.Toast
+import com.bomostory.sceneeditmodule.*
 import com.bomostory.sceneeditmodule.basicdata.*
+import com.bomostory.sceneeditmodule.screen.movie.music.MusicEditDialog
+import com.bomostory.sceneeditmodule.screen.movie.music.MusicSelectDialog
+import com.bomostory.sceneeditmodule.screen.movie.music.MusicSelectFragment
 import com.bomostory.sceneeditmodule.share.ExportPdfDialog
 import com.bomostory.sceneeditmodule.share.ShareDialog
 import com.bomostory.sceneeditmodule.utils.MoviePlayer
 import com.bomostory.sceneeditmodule.utils.MusicPlayer
 import com.bomostory.sceneeditmodule.utils.TimeUtils
-import com.bomostory.sceneeditmodule.view.AudioTrackGroupView
-import com.bomostory.sceneeditmodule.view.MovieSelectView
+import com.bomostory.sceneeditmodule.screen.view.AudioTrackGroupView
+import com.bomostory.sceneeditmodule.screen.view.MovieSelectView
 import com.example.exportmedia.MediaHelper
 import com.example.exportmedia.audio.AudioEditor
 import com.example.tfat.myapplication.R

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/MusicEditDialog.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule
+package com.bomostory.sceneeditmodule.screen.movie.music
 
 import android.content.Context
 import android.content.DialogInterface

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/MusicSelectDialog.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule
+package com.bomostory.sceneeditmodule.screen.movie.music
 
 import android.content.Context
 import android.content.DialogInterface

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/MusicSelectFragment.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule
+package com.bomostory.sceneeditmodule.screen.movie.music
 
 import android.content.Context
 import android.os.Bundle

+ 1 - 4
src/main/java/com/bomostory/sceneeditmodule/view/ActorView.kt

@@ -1,9 +1,6 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
-import android.graphics.Canvas
-import android.graphics.Color
-import android.graphics.Paint
 import android.graphics.drawable.Drawable
 import android.util.AttributeSet
 import android.widget.ImageView

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/view/AudioTrackGroupView.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.support.constraint.ConstraintLayout

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/view/CollapsedBar.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.support.constraint.ConstraintLayout

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/view/DialogueView.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.util.AttributeSet

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/view/EditActorView.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.graphics.Canvas

+ 1 - 3
src/main/java/com/bomostory/sceneeditmodule/view/LayerView.kt

@@ -1,12 +1,10 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.util.AttributeSet
-import android.view.View
 import android.widget.RelativeLayout
 import com.bomostory.sceneeditmodule.basicdata.Actor
 import com.bomostory.sceneeditmodule.basicdata.Dialogue
-import com.example.tfat.myapplication.navigationbar.actor.ActorAdapter
 
 class LayerView : RelativeLayout {
 

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/view/MovieEditBtnPanelView.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.support.constraint.ConstraintLayout

+ 1 - 2
src/main/java/com/bomostory/sceneeditmodule/view/MovieEditView.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.support.constraint.ConstraintLayout
@@ -8,7 +8,6 @@ import android.view.View
 import android.widget.CompoundButton
 import android.widget.SeekBar
 import com.bomostory.sceneeditmodule.basicdata.Music
-import com.bomostory.sceneeditmodule.basicdata.Scene
 import com.bomostory.sceneeditmodule.basicdata.Story
 import com.example.tfat.myapplication.R
 import kotlinx.android.synthetic.main.movie_edit_view.view.*

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/view/MovieSeekView.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.support.constraint.ConstraintLayout

+ 1 - 3
src/main/java/com/bomostory/sceneeditmodule/view/MovieSelectView.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.graphics.drawable.Drawable
@@ -10,8 +10,6 @@ import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
 import android.view.animation.Animation
-import android.widget.ImageView
-import android.widget.TextView
 import com.bomostory.sceneeditmodule.basicdata.Scene
 import com.bomostory.sceneeditmodule.basicdata.Story
 import com.bomostory.sceneeditmodule.utils.AnimationUtils

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/view/MovieView.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.graphics.drawable.Drawable

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/view/ProgressView.kt

@@ -1,4 +1,4 @@
-package com.bomostory.sceneeditmodule.view
+package com.bomostory.sceneeditmodule.screen.view
 
 import android.content.Context
 import android.support.constraint.ConstraintLayout

+ 4 - 4
src/main/res/layout/activity_movie_edit.xml

@@ -5,9 +5,9 @@
     android:layout_height="match_parent"
     android:background="#212121"
     android:keepScreenOn="true"
-    tools:context="com.bomostory.sceneeditmodule.MovieEditActivity">
+    tools:context="com.bomostory.sceneeditmodule.screen.movie.MovieEditActivity">
 
-    <com.bomostory.sceneeditmodule.view.MovieView
+    <com.bomostory.sceneeditmodule.screen.view.MovieView
         android:id="@+id/movieView"
         android:layout_width="1024dp"
         android:layout_height="512dp"
@@ -15,13 +15,13 @@
         android:background="@android:color/holo_blue_dark"
         app:layout_constraintTop_toTopOf="parent" />
 
-    <com.bomostory.sceneeditmodule.view.MovieEditView
+    <com.bomostory.sceneeditmodule.screen.view.MovieEditView
         android:id="@+id/movieEditView"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         app:layout_constraintBottom_toBottomOf="parent" />
 
-    <com.bomostory.sceneeditmodule.view.ProgressView
+    <com.bomostory.sceneeditmodule.screen.view.ProgressView
         android:id="@+id/progressView"
         android:layout_width="match_parent"
         android:layout_height="match_parent"

+ 1 - 1
src/main/res/layout/activity_scene_edit.xml

@@ -22,7 +22,7 @@
             android:src="@drawable/ic_button_back_01"/>
     </RelativeLayout>
 
-     <com.bomostory.sceneeditmodule.view.SceneView1
+     <com.bomostory.sceneeditmodule.screen.view.SceneView1
         android:id="@+id/sceneEditView"
         android:layout_width="1024dp"
         android:layout_height="512dp"

+ 1 - 1
src/main/res/layout/actor_view.xml

@@ -8,7 +8,7 @@
         android:id="@+id/layout_edit_actor_view_actor_Image"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content">
-        <com.bomostory.sceneeditmodule.view.ActorView
+        <com.bomostory.sceneeditmodule.screen.view.ActorView
             android:id="@+id/actor_view_layout"
             android:padding="24dp"
             android:layout_width="match_parent"

+ 1 - 1
src/main/res/layout/audio_track_group_view.xml

@@ -49,7 +49,7 @@
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 
-    <com.bomostory.sceneeditmodule.view.CollapsedBar
+    <com.bomostory.sceneeditmodule.screen.view.CollapsedBar
         android:id="@+id/audioBar"
         android:layout_width="0dp"
         android:layout_height="48dp"

+ 1 - 1
src/main/res/layout/dialog_share.xml

@@ -46,7 +46,7 @@
         app:layout_constraintTop_toBottomOf="@id/tv_shareDialog_name"
         tools:text="by Alexander Wilson" />
 
-    <com.bomostory.sceneeditmodule.view.MovieView
+    <com.bomostory.sceneeditmodule.screen.view.MovieView
         android:id="@+id/movieView_shareDialog_preview"
         android:layout_width="560dp"
         android:layout_height="280dp"

+ 1 - 1
src/main/res/layout/fragment_music_edit_dialog.xml

@@ -3,7 +3,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:context="com.bomostory.sceneeditmodule.MusicEditDialog">
+    tools:context="com.bomostory.sceneeditmodule.screen.movie.music.MusicEditDialog">
 
     <TextView
         android:id="@+id/musicName"

+ 1 - 1
src/main/res/layout/fragment_music_select.xml

@@ -2,7 +2,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:context="com.bomostory.sceneeditmodule.MusicSelectFragment">
+    tools:context="com.bomostory.sceneeditmodule.screen.movie.music.MusicSelectFragment">
 
     <android.support.v7.widget.RecyclerView
         android:id="@+id/musicList"

+ 4 - 4
src/main/res/layout/movie_edit_view.xml

@@ -5,20 +5,20 @@
     android:layout_height="wrap_content"
     android:background="#60000000">
 
-    <com.bomostory.sceneeditmodule.view.MovieSeekView
+    <com.bomostory.sceneeditmodule.screen.view.MovieSeekView
         android:id="@+id/movieSeekView"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="8dp"
         app:layout_constraintBottom_toTopOf="@+id/movieSelectView" />
 
-    <com.bomostory.sceneeditmodule.view.MovieSelectView
+    <com.bomostory.sceneeditmodule.screen.view.MovieSelectView
         android:id="@+id/movieSelectView"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         app:layout_constraintBottom_toTopOf="@+id/audioTrackGroupView" />
 
-    <com.bomostory.sceneeditmodule.view.AudioTrackGroupView
+    <com.bomostory.sceneeditmodule.screen.view.AudioTrackGroupView
         android:id="@+id/audioTrackGroupView"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
@@ -26,7 +26,7 @@
         android:visibility="gone"
         app:layout_constraintBottom_toTopOf="@+id/movieEditBtnPanel" />
 
-    <com.bomostory.sceneeditmodule.view.MovieEditBtnPanelView
+    <com.bomostory.sceneeditmodule.screen.view.MovieEditBtnPanelView
         android:id="@+id/movieEditBtnPanel"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"

+ 1 - 1
src/main/res/layout/movie_select_view.xml

@@ -28,7 +28,7 @@
         app:layout_constraintRight_toLeftOf="@+id/expandMore"
         app:layout_constraintTop_toTopOf="parent" />
 
-    <com.bomostory.sceneeditmodule.view.CollapsedBar
+    <com.bomostory.sceneeditmodule.screen.view.CollapsedBar
         android:id="@+id/movieBar"
         android:layout_width="0dp"
         android:layout_height="48dp"