Przeglądaj źródła

Merge branch 'master' of git.kdan.cc:Bomo/Bomo_for_Android_editorModule

Shan-PC\Shan 6 lat temu
rodzic
commit
73e3f43d53

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

@@ -5,9 +5,9 @@ import java.io.File
 
 object Config {
     private val ROOT = File(Environment.getExternalStorageDirectory(), "Bomo")
-    private const val ASSETS_FOLDER_PATH = "/Android/yuheng"
-    private const val PROJECTS_FOLDER_PATH = "/Android/yuheng/project"
-    private const val IMAGE_FOLDER_PATH = "/Android/yuheng/image"
+    private const val ASSETS_FOLDER_PATH = "/Bomo/Assets"
+    private const val PROJECTS_FOLDER_PATH = "/Bomo/Projects"
+    private const val IMAGE_FOLDER_PATH = "/Bomo/Image"
     val IMAGE_FOLDER = File(Environment.getExternalStorageDirectory(), IMAGE_FOLDER_PATH)
     val ASSETS_FOLDER = File(Environment.getExternalStorageDirectory(), ASSETS_FOLDER_PATH)
     val PROJECTS_FOLDER = File(Environment.getExternalStorageDirectory(), PROJECTS_FOLDER_PATH)

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

@@ -15,13 +15,9 @@ import android.view.View
 import android.widget.CompoundButton
 import android.widget.SeekBar
 import android.widget.Toast
-import com.bomostory.sceneeditmodule.basicdata.DataParser
-import com.bomostory.sceneeditmodule.basicdata.Music
-import com.bomostory.sceneeditmodule.basicdata.Project
-import com.bomostory.sceneeditmodule.basicdata.Scene
+import com.bomostory.sceneeditmodule.basicdata.*
 import com.bomostory.sceneeditmodule.share.ExportPdfDialog
 import com.bomostory.sceneeditmodule.share.ShareDialog
-import com.bomostory.sceneeditmodule.basicdata.*
 import com.bomostory.sceneeditmodule.utils.MoviePlayer
 import com.bomostory.sceneeditmodule.utils.MusicPlayer
 import com.bomostory.sceneeditmodule.view.AudioTrackGroupView
@@ -304,8 +300,7 @@ class MovieEditActivity : AppCompatActivity(),
 
     private fun onClickSaveAndShareBtn(view: View) {
         shareDialog.apply {
-            name = project?.name ?: ""
-            author = project?.author ?: ""
+            project = this@MovieEditActivity.project ?: return@apply
             onClickBomo = Runnable { saveMovie() }
             onClickExportPdf = Runnable { onClickExportPdf() }
         }.show(supportFragmentManager)

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

@@ -11,7 +11,6 @@ import android.graphics.drawable.Drawable
 import android.support.v7.widget.RecyclerView
 import android.view.*
 import android.widget.PopupWindow
-import com.bomostory.sceneeditmodule.MovieEditActivity
 import com.example.tfat.myapplication.navigationbar.NavigationBarView
 import com.example.tfat.myapplication.navigationbar.actor.ActorAdapter
 import com.example.tfat.myapplication.navigationbar.scene.AddSceneAdapter
@@ -25,19 +24,22 @@ 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.example.tfat.myapplication.navigationbar.RecordFinishView
 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 android.util.DisplayMetrics
+import com.bomostory.sceneeditmodule.MovieEditActivity
+import com.bomostory.sceneeditmodule.view.OnTouchSceneListener
+import com.example.tfat.myapplication.navigationbar.EditSceneView
+import com.example.tfat.myapplication.navigationbar.RecordFinishView
 import io.reactivex.android.schedulers.AndroidSchedulers
 import io.reactivex.schedulers.Schedulers
 import java.util.concurrent.CopyOnWriteArrayList
 
 class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener, EditActorView.OnActorChangeListener,
         OnTouchBoMoSceneListener.OnSceneMoveListener, DialogInterface.OnDismissListener, FileUtils.OnSaveActorImage,
-        LayerManagementDialog.OnLayerChange {
+        OnTouchSceneListener.OnSceneTouchListener,LayerManagementDialog.OnLayerChange {
 
     private lateinit var project: Project
     private var currentSceneIndex = 0
@@ -115,6 +117,16 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
     private fun initControlBarView() {
         controlBarView.setBtnSelected(6)
         switchToPreViewLayer()
+        project.story?.let {
+            it.scenes?.let {
+                if (it[currentSceneIndex].record != null) {
+                    controlBarView.visibility = View.INVISIBLE
+                    sceneEditView.setOnTouchListener(null)
+                } else {
+                    controlBarView.visibility = View.VISIBLE
+                }
+            }
+        }
         controlBarView.setonClickSwipeLayerBtn(View.OnClickListener {
             switchToPreViewLayer()
         })
@@ -169,43 +181,66 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
                     })
                 } else {
                     navigationBar.removeAllViews()
-                    var recordFinishView = RecordFinishView(this)
-                    recordFinishView.setOnNextSceneClickListener(View.OnClickListener {
-                        currentSceneIndex++
+                    var editSceneView = EditSceneView(this)
+                    navigationBar.addView(editSceneView)
+                    setControlSceneView()
+                    editSceneView.setOnClickDoneListener(View.OnClickListener {
+                        val pd = ProgressDialog(this).apply {
+                                     setCancelable(false)
+                                 }
+                    FileUtils.saveProject(project, 1920,1080)
+                             .subscribeOn(Schedulers.io())
+                             .observeOn(AndroidSchedulers.mainThread())
+                             .doOnSubscribe { pd.show() }
+                             .doFinally { pd.dismiss() }
+                             .subscribe {
+                                 listeners.forEach {it.run()}
+                             }
+                    val intent = Intent(this, MovieEditActivity::class.java)
+                    intent.putExtra(MovieEditActivity.PROJECT_KEY, Gson().toJson(project))
+                    startActivity(intent)
+                    })
+                    editSceneView.setOnClickStartOverListener(View.OnClickListener {
                         project.story?.let {
                             it.scenes?.let{
-                                when(currentSceneIndex < it.size){
+                                it[currentSceneIndex].record = null
+                                sceneEditView.scene = it[currentSceneIndex]
+                                initNavigationBarView()
+                            }
+                        }
+                    })
+                    editSceneView.setOnClickReplaceListener(View.OnClickListener {
+                        viewContainer.removeAllViews()
+                        var addSceneView = AddSceneView(this)
+                        viewContainer.addView(addSceneView)
+                        val layoutManager = LinearLayoutManager(this)
+                        layoutManager.orientation = LinearLayoutManager.HORIZONTAL
+                        var onSceneSelectedArrayList = ArrayList<View.OnClickListener>()
+                        for (i in 0 until resourceThemeBitmap.size) {
+                            onSceneSelectedArrayList.add(replaceScene(i))
+                        }
+                        var addSceneAdapter = AddSceneAdapter(this, resourceThemeBitmap, onSceneSelectedArrayList)
+                        var newSceneRecyclerView = addSceneView.findViewById<RecyclerView>(R.id.new_scene_recycler_view)
+                        newSceneRecyclerView.layoutManager = layoutManager
+                        newSceneRecyclerView.adapter = addSceneAdapter
+                    })
+                    editSceneView.setOnClickDeleteListener(View.OnClickListener {
+                        project.story?.let {
+                            it.scenes?.let{
+                                if (it.size <= 1) { return@let }
+                                it.removeAt(currentSceneIndex)
+                                when(currentSceneIndex >= it.size){
                                     true -> {
-                                        switchToPreViewLayer()
-                                        sceneEditView.scene = it[currentSceneIndex]
-                                    }
-                                    false -> {
                                         currentSceneIndex = 0
-                                        sceneEditView.scene = it[currentSceneIndex]
+                                        sceneEditView.scene = it[0]
                                     }
+                                    false -> sceneEditView.scene = it[currentSceneIndex]
                                 }
+                                initNavigationBarView()
+                                initControlSceneView()
                             }
                         }
-                        initControlBarView()
-                        initNavigationBarView()
                     })
-                    recordFinishView.setOnFinishClickListener(View.OnClickListener {
-                        val pd = ProgressDialog(this).apply {
-                            setCancelable(false)
-                        }
-                        FileUtils.saveProject(project, 1920,1080)
-                                .subscribeOn(Schedulers.io())
-                                .observeOn(AndroidSchedulers.mainThread())
-                                .doOnSubscribe { pd.show() }
-                                .doFinally { pd.dismiss() }
-                                .subscribe {
-                                    listeners.forEach {it.run()}
-                                }
-                        val intent = Intent(this, MovieEditActivity::class.java)
-                        intent.putExtra(MovieEditActivity.PROJECT_KEY, Gson().toJson(project))
-                        startActivity(intent)
-                    })
-                    navigationBar.addView(recordFinishView)
                 }
             }
         }
@@ -246,6 +281,10 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
             viewContainer.removeAllViews()
             return
         }
+        setControlSceneView()
+    }
+
+    private fun setControlSceneView(){
         var projectBitmaps = ArrayList<Drawable>()
         var onSceneSelectedArrayList = ArrayList<View.OnClickListener>()
         project.story?.let {
@@ -300,7 +339,6 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
         viewContainer.removeAllViews()
         viewContainer.addView(controlSceneView)
     }
-
     private fun initRecord(){
         startRecord.setOnClickListener(View.OnClickListener {
             if (!isRecord) {
@@ -319,17 +357,45 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
                 }
                 startRecord.setImageDrawable(resources.getDrawable(R.drawable.ic_btn_record))
                 navigationBar.visibility = View.VISIBLE
+                initControlBarView()
                 initControlSceneView()
-                initNavigationBarView()
+                initRecordFinishView()
             }
         })
     }
 
 
+    private fun initRecordFinishView(){
+        navigationBar.removeAllViews()
+        var recordFinishView = RecordFinishView(this)
+        recordFinishView.setOnNextSceneClickListener(View.OnClickListener {
+            currentSceneIndex++
+            project.story?.let {
+                it.scenes?.let{
+                    when(currentSceneIndex < it.size){
+                        true -> {
+                            switchToPreViewLayer()
+                            sceneEditView.scene = it[currentSceneIndex]
+                        }
+                        false -> {
+                            currentSceneIndex = 0
+                            sceneEditView.scene = it[currentSceneIndex]
+                        }
+                    }
+                }
+            }
+            initControlBarView()
+            initNavigationBarView()
+        })
+        recordFinishView.setOnFinishClickListener(View.OnClickListener {
+            initNavigationBarView()
+        })
+        navigationBar.addView(recordFinishView)
+    }
     private fun switchScene(position: Int): View.OnClickListener {
         return View.OnClickListener {
             currentSceneIndex = position
-            switchLayer(6)
+            switchToPreViewLayer()
             project.story?.let {
                 it.scenes?.let{
                     sceneEditView.scene = it[position]
@@ -342,6 +408,15 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
 
     private fun switchLayer(layerIndex: Int){
         viewContainer.removeAllViews()
+        if(currentLayerIndex != 6) {
+            project.story?.let {
+                it.scenes?.let {
+                    for (i in 0 until it[currentSceneIndex].layers[currentLayerIndex].actors.size) {
+                        it[currentSceneIndex].layers[currentLayerIndex].actors[i].isSelect = false
+                    }
+                }
+            }
+        }
         currentLayerIndex = layerIndex
         controlBarView.setBtnSelected(4 - layerIndex)
         project.story?.let {
@@ -358,10 +433,13 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
                             }
                     }
                 }
+
                 sceneEditView.scene = it[currentSceneIndex]
             }
         }
-        sceneEditView.setOnTouchListener(null)
+        val sceneListener = OnTouchSceneListener()
+        sceneListener.setCallBack(this)
+        sceneEditView.setOnTouchListener(sceneListener)
         sceneEditView.x = 0
         setActorDropLayer()
         sceneEditView.setLayerVisible(layerIndex)
@@ -408,7 +486,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
     private fun addScene(position: Int): View.OnClickListener {
         return View.OnClickListener {
             var scene = Scene()
-            for (i in 0 until 5){
+            for (i in 5 until 0){
                 val layer = Layer()
                 layer.id = i
                 scene.layers.add(layer)
@@ -425,6 +503,18 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
         }
     }
 
+    private fun replaceScene(position: Int): View.OnClickListener {
+        return View.OnClickListener {
+            project.story?.let {
+                it.scenes?.let{
+                    it[currentSceneIndex].backgroundPath = resourceThemeBitmap[position]
+                    sceneEditView.scene = it[currentSceneIndex]
+                }
+            }
+            initControlSceneView()
+            initNavigationBarView()
+        }
+    }
     private fun setActorPositionZ(actors: ArrayList<Actor>){
         for (actor in actors) {
             actor.positionZ = actors.indexOf(actor)
@@ -455,6 +545,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
             }
         }
         setActorDropLayer()
+        sceneEditView.setLayerVisible(currentLayerIndex)
     }
 
     private fun addDialogue(positionX: Int, positionY: Int, resource: Int) {
@@ -486,6 +577,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
                 sceneEditView.scene = it[currentSceneIndex]
             }
         }
+        sceneEditView.setLayerVisible(currentLayerIndex)
     }
 
     override fun onActorSelected(actor: Actor) {
@@ -502,6 +594,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
                 sceneEditView.scene = it[currentSceneIndex]
             }
         }
+        sceneEditView.setLayerVisible(currentLayerIndex)
     }
 
     override fun onActorLongClick(actor: Actor) {
@@ -518,6 +611,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
                 sceneEditView.scene = it[currentSceneIndex]
             }
         }
+        sceneEditView.setLayerVisible(currentLayerIndex)
         var popupWindow = PopupWindow(this)
         val popupView = LayoutInflater.from(this).inflate(R.layout.control_actor_dialog, null)
         popupView.duplicate.setOnClickListener{
@@ -665,4 +759,20 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
             return@OnDragListener true
         }
     }
+
+    override fun onSceneTouch(){
+        unSelectActor()
+        sceneEditView.setLayerVisible(currentLayerIndex)
+    }
+
+    private fun unSelectActor(){
+        project.story?.let {
+            it.scenes?.let {
+                for(i in 0 until it[currentSceneIndex].layers[currentLayerIndex].actors.size){
+                    it[currentSceneIndex].layers[currentLayerIndex].actors[i].isSelect = false
+                }
+                sceneEditView.scene = it[currentSceneIndex]
+            }
+        }
+    }
 }

+ 0 - 75
src/main/java/com/bomostory/sceneeditmodule/basicdata/DataParser.kt

@@ -60,79 +60,4 @@ object DataParser {
         }
         return musics
     }
-
-    fun parseStory(arrayList: ArrayList<JSONObject>): Story {
-        val story = Story()
-        for (jsonObject in arrayList) {
-            val scene = parseScene(jsonObject)
-            story.scenes.add(scene)
-        }
-        return story
-    }
-
-    private fun parseScene(jsonObject: JSONObject): Scene {
-        val scene = Scene()
-
-        val layer0 = parseLayer(JSONObject(jsonObject.optString("layer0")))
-        val layer1 = parseLayer(JSONObject(jsonObject.optString("layer1")))
-        val layer2 = parseLayer(JSONObject(jsonObject.optString("layer2")))
-        val layer3 = parseLayer(JSONObject(jsonObject.optString("layer3")))
-        val layer4 = parseLayer(JSONObject(jsonObject.optString("layer4")))
-
-        scene.layers.add(layer0)
-        scene.layers.add(layer1)
-        scene.layers.add(layer2)
-        scene.layers.add(layer3)
-        scene.layers.add(layer4)
-
-        scene.record = parseRecord(jsonObject.optJSONObject("record"))
-
-        scene.backgroundPath = (Environment.getExternalStorageDirectory().toString()
-                + "/Android/yuheng/" + jsonObject.optString("background"))
-
-        return scene
-    }
-
-    private fun parseRecord(jsonObject: JSONObject): Record {
-        val record = Record()
-        record.period = jsonObject.optLong("period")
-        val tracks = jsonObject.optJSONArray("tracks")
-        tracks?.let {
-            for (i in 0 until it.length()) {
-                val track = parseTrack(tracks.optJSONObject(i))
-                record.tracks.add(track)
-            }
-        }
-        return record
-    }
-
-    private fun parseTrack(jsonObject: JSONObject): Track {
-        val track = Track()
-        track.time = jsonObject.optLong("time")
-        track.positionX = jsonObject.optInt("positionX")
-        return track
-    }
-
-    private fun parseLayer(jsonObject: JSONObject): Layer {
-        val layer = Layer()
-        layer.id = jsonObject.optInt("id")
-        layer.name = jsonObject.optString("name")
-        val actors = jsonObject.optJSONArray("actor")
-        for (i in 0 until actors.length()) {
-            val actor = parseActor(actors.optJSONObject(i))
-            layer.actors.add(actor)
-        }
-        return layer
-    }
-
-    private fun parseActor(jsonObject: JSONObject): Actor {
-        val actor = Actor()
-        actor.resourcePath = (Environment.getExternalStorageDirectory().toString()
-                + "/Android/yuheng/" + jsonObject.optString("resource"))
-        actor.positionX = jsonObject.optInt("positionX")
-        actor.positionY = jsonObject.optInt("positionY")
-        actor.sideLength = jsonObject.optInt("size")
-        return actor
-    }
-
 }

+ 45 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/EditSceneView.kt

@@ -0,0 +1,45 @@
+package com.example.tfat.myapplication.navigationbar
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.widget.RelativeLayout
+import com.example.tfat.myapplication.R
+import kotlinx.android.synthetic.main.view_edit_scene.view.*
+
+class EditSceneView : RelativeLayout{
+
+    constructor(context : Context) : super(context) {
+        initView()
+    }
+
+    constructor(context: Context, attrs: AttributeSet): super(context, attrs) {
+        initView()
+    }
+
+    constructor(context: Context, attrs: AttributeSet, defStyle: Int): super(context, attrs, defStyle) {
+        initView()
+    }
+
+    private fun initView(){
+        val inflater = LayoutInflater.from(context)
+        inflater.inflate(R.layout.view_edit_scene, this, true)
+    }
+
+    fun setOnClickDoneListener(onClickListener: OnClickListener) {
+        btn_edit_scene_done.setOnClickListener(onClickListener)
+    }
+
+    fun setOnClickStartOverListener(onClickListener: OnClickListener) {
+        btn_edit_scene_start_over.setOnClickListener(onClickListener)
+    }
+
+    fun setOnClickReplaceListener(onClickListener: OnClickListener) {
+        btn_edit_scene_replace.setOnClickListener(onClickListener)
+    }
+
+    fun setOnClickDeleteListener(onClickListener: OnClickListener) {
+        btn_edit_scene_delete.setOnClickListener(onClickListener)
+    }
+
+}

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

@@ -0,0 +1,34 @@
+package com.bomostory.sceneeditmodule.view
+
+import android.view.MotionEvent
+import android.view.View
+
+class OnTouchSceneListener : View.OnTouchListener{
+    var positionX = 0f
+    var onSceneTouchCallBack: OnSceneTouchListener? = null
+
+    override fun onTouch(v: View?, event: MotionEvent?): Boolean {
+            when (event?.action) {
+                MotionEvent.ACTION_DOWN -> {
+                    positionX = event.x
+                    onSceneTouchCallBack?.onSceneTouch()
+                }
+                MotionEvent.ACTION_MOVE -> {
+
+                }
+                MotionEvent.ACTION_UP -> {
+                }
+            }
+        return true
+    }
+
+    fun setCallBack(onSceneMoveCallBack: OnSceneTouchListener){
+        this.onSceneTouchCallBack = onSceneMoveCallBack
+    }
+    interface OnSceneTouchListener{
+        fun onSceneTouch()
+    }
+
+}
+
+

+ 5 - 4
src/main/java/com/bomostory/sceneeditmodule/share/ShareDialog.kt

@@ -6,6 +6,7 @@ import android.support.v4.app.FragmentManager
 import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
+import com.bomostory.sceneeditmodule.basicdata.Project
 import com.example.tfat.myapplication.R
 import kotlinx.android.synthetic.main.dialog_share.view.*
 
@@ -13,8 +14,7 @@ class ShareDialog : DialogFragment() {
 
     private val dialogTag = this::class.java.simpleName
 
-    var name: String = ""
-    var author: String = ""
+    lateinit var project: Project
 
     var onClickEditCover = Runnable {}
     var onClickExportPdf = Runnable {}
@@ -27,8 +27,9 @@ class ShareDialog : DialogFragment() {
 
     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
         return inflater.inflate(R.layout.dialog_share, container, false).apply {
-            tv_shareDialog_name.text = name
-            tv_shareDialog_author.text = author
+            movieView_shareDialog_preview.scene = project.story?.scenes?.get(0)
+            tv_shareDialog_name.text = project.name
+            tv_shareDialog_author.text = project.author
             btn_shareDialog_editCover.setOnClickListener { onClickEditCover.run() }
             btn_shareDialog_exportPdf.setOnClickListener { onClickExportPdf.run() }
             btn_shareDialog_print.setOnClickListener { onClickPrint.run() }

BIN
src/main/res/drawable/green.png


BIN
src/main/res/drawable/hill.png


+ 2 - 6
src/main/res/drawable/ic_delete_w.xml

@@ -4,17 +4,13 @@
     android:viewportWidth="24"
     android:viewportHeight="24">
   <path
-      android:pathData="M8,9h8v10h-8z"
+      android:pathData="M8,9h8v10H8z"
       android:strokeAlpha="0.3"
       android:fillColor="#FFF"
       android:fillType="nonZero"
       android:fillAlpha="0.3"/>
   <path
-      android:pathData="M15.5,4l-1,-1l-5,0l-1,1l-3.5,0l0,2l14,0l0,-2z"
-      android:fillColor="#FFF"
-      android:fillType="nonZero"/>
-  <path
-      android:pathData="M6,19C6,20.1 6.9,21 8,21L16,21C17.1,21 18,20.1 18,19L18,7L6,7L6,19ZM8,9L16,9L16,19L8,19L8,9Z"
+      android:pathData="M15.5,4l-1,-1h-5l-1,1H5v2h14V4zM6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM8,9h8v10H8V9z"
       android:fillColor="#FFF"
       android:fillType="nonZero"/>
 </vector>

+ 10 - 0
src/main/res/drawable/ic_replace.xml

@@ -0,0 +1,10 @@
+<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="M11,6c1.38,0 2.63,0.56 3.54,1.46L12,10h6L18,4l-2.05,2.05A6.976,6.976 0,0 0,11 4c-3.53,0 -6.43,2.61 -6.92,6L6.1,10A5,5 0,0 1,11 6zM16.64,15.14A6.89,6.89 0,0 0,17.92 12L15.9,12a5,5 0,0 1,-4.9 4c-1.38,0 -2.63,-0.56 -3.54,-1.46L10,12L4,12v6l2.05,-2.05A6.976,6.976 0,0 0,11 18c1.55,0 2.98,-0.51 4.14,-1.36L20,21.49 21.49,20l-4.85,-4.86z"
+      android:fillColor="#4E342E"
+      android:fillType="nonZero"/>
+</vector>

+ 14 - 0
src/main/res/drawable/ic_startover.xml

@@ -0,0 +1,14 @@
+<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="M13,3a9,9 0,0 0,-9 9H1l4,3.99L9,12H6c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42A8.954,8.954 0,0 0,13 21a9,9 0,0 0,0 -18z"
+      android:fillColor="#4E342E"
+      android:fillType="nonZero"/>
+  <path
+      android:pathData="M12,8v5l4.25,2.52 0.77,-1.28 -3.52,-2.09V8z"
+      android:fillColor="#4E342E"
+      android:fillType="nonZero"/>
+</vector>

BIN
src/main/res/drawable/sky.png


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

@@ -46,8 +46,8 @@
         app:layout_constraintTop_toBottomOf="@id/tv_shareDialog_name"
         tools:text="by Alexander Wilson" />
 
-    <View
-        android:id="@+id/view_shareDialog_preview"
+    <com.bomostory.sceneeditmodule.view.MovieView
+        android:id="@+id/movieView_shareDialog_preview"
         android:layout_width="560dp"
         android:layout_height="280dp"
         android:layout_marginTop="24dp"
@@ -72,8 +72,8 @@
         android:text="@string/share_dialog_edit_cover"
         app:layout_constraintBottom_toTopOf="@id/btn_shareDialog_exportPdf"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toLeftOf="@id/view_shareDialog_preview"
-        app:layout_constraintTop_toTopOf="@id/view_shareDialog_preview" />
+        app:layout_constraintRight_toLeftOf="@id/movieView_shareDialog_preview"
+        app:layout_constraintTop_toTopOf="@id/movieView_shareDialog_preview" />
 
     <Button
         android:id="@+id/btn_shareDialog_exportPdf"
@@ -89,7 +89,7 @@
         android:text="@string/share_dialog_export_pdf"
         app:layout_constraintBottom_toTopOf="@id/btn_shareDialog_print"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toLeftOf="@id/view_shareDialog_preview"
+        app:layout_constraintRight_toLeftOf="@id/movieView_shareDialog_preview"
         app:layout_constraintTop_toBottomOf="@id/btn_shareDialog_editCover" />
 
     <TextView
@@ -107,7 +107,7 @@
         android:gravity="center"
         android:text="@string/share_dialog_print"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toLeftOf="@id/view_shareDialog_preview"
+        app:layout_constraintRight_toLeftOf="@id/movieView_shareDialog_preview"
         app:layout_constraintTop_toBottomOf="@id/btn_shareDialog_exportPdf" />
 
     <ImageView
@@ -118,8 +118,8 @@
         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" />
+        app:layout_constraintLeft_toRightOf="@id/movieView_shareDialog_preview"
+        app:layout_constraintTop_toTopOf="@id/movieView_shareDialog_preview" />
 
     <ImageView
         android:id="@+id/iv_shareDialog_youtube"
@@ -130,7 +130,7 @@
         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_constraintLeft_toRightOf="@id/movieView_shareDialog_preview"
         app:layout_constraintTop_toBottomOf="@id/iv_shareDialog_bomo" />
 
     <ImageView
@@ -142,7 +142,7 @@
         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_constraintLeft_toRightOf="@id/movieView_shareDialog_preview"
         app:layout_constraintTop_toBottomOf="@id/iv_shareDialog_youtube" />
 
     <ImageView
@@ -154,7 +154,7 @@
         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_constraintLeft_toRightOf="@id/movieView_shareDialog_preview"
         app:layout_constraintTop_toBottomOf="@id/iv_shareDialog_facebook" />
 
     <ImageView
@@ -166,7 +166,7 @@
         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_constraintLeft_toRightOf="@id/movieView_shareDialog_preview"
         app:layout_constraintTop_toBottomOf="@id/iv_shareDialog_twitter" />
 
     <ImageView
@@ -176,8 +176,8 @@
         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" />
+        app:layout_constraintLeft_toLeftOf="@id/movieView_shareDialog_preview"
+        app:layout_constraintTop_toBottomOf="@id/movieView_shareDialog_preview" />
 
     <TextView
         android:id="@+id/tv_shareDialog_time"
@@ -188,7 +188,7 @@
         android:textSize="16sp"
         android:textStyle="normal"
         app:layout_constraintBottom_toBottomOf="@id/iv_shareDialog_play"
-        app:layout_constraintRight_toRightOf="@id/view_shareDialog_preview"
+        app:layout_constraintRight_toRightOf="@id/movieView_shareDialog_preview"
         app:layout_constraintTop_toTopOf="@id/iv_shareDialog_play"
         tools:text="0:20/3:00" />
 

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

@@ -3,7 +3,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="64dp"
-    android:background="#60000000">
+    android:background="#212121">
 
     <Button
     android:id="@+id/finish"

+ 65 - 0
src/main/res/layout/view_edit_scene.xml

@@ -0,0 +1,65 @@
+<?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"
+    android:layout_width="match_parent"
+    android:layout_height="64dp"
+    android:background="#212121">
+
+    <Button
+        android:id="@+id/btn_edit_scene_done"
+        android:layout_width="144dp"
+        android:layout_height="36dp"
+        android:layout_marginBottom="14dp"
+        android:layout_marginEnd="8dp"
+        android:background="@drawable/btn_round_corner_main"
+        android:drawableLeft="@drawable/ic_done"
+        android:paddingLeft="16dp"
+        android:paddingRight="16dp"
+        android:text="DONE"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toRightOf="parent"/>
+
+    <Button
+        android:id="@+id/btn_edit_scene_start_over"
+        android:layout_width="144dp"
+        android:layout_height="36dp"
+        android:layout_marginBottom="14dp"
+        android:layout_marginEnd="8dp"
+        android:background="@drawable/btn_round_corner_main"
+        android:drawableLeft="@drawable/ic_startover"
+        android:paddingLeft="16dp"
+        android:paddingRight="16dp"
+        android:text="START OVER"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toLeftOf="@+id/btn_edit_scene_done"/>
+
+    <Button
+        android:id="@+id/btn_edit_scene_replace"
+        android:layout_width="144dp"
+        android:layout_height="36dp"
+        android:layout_marginBottom="14dp"
+        android:layout_marginEnd="8dp"
+        android:background="@drawable/btn_round_corner_main"
+        android:drawableLeft="@drawable/ic_replace"
+        android:paddingLeft="16dp"
+        android:paddingRight="16dp"
+        android:text="REPLACE"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toLeftOf="@+id/btn_edit_scene_start_over" />
+
+    <Button
+        android:id="@+id/btn_edit_scene_delete"
+        android:layout_width="144dp"
+        android:layout_height="36dp"
+        android:layout_marginBottom="14dp"
+        android:layout_marginEnd="8dp"
+        android:background="@drawable/btn_round_corner_red"
+        android:drawableLeft="@drawable/ic_delete_w"
+        android:paddingLeft="16dp"
+        android:paddingRight="16dp"
+        android:text="DELETE"
+        android:textColor="#ffffff"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toLeftOf="@+id/btn_edit_scene_replace" />
+
+</android.support.constraint.ConstraintLayout>