Sfoglia il codice sorgente

for 11/15 google play store

faterhenry 6 anni fa
parent
commit
832c4f965f
60 ha cambiato i file con 910 aggiunte e 71 eliminazioni
  1. 82 13
      src/main/java/com/bomostory/sceneeditmodule/SceneEditActivity.kt
  2. 2 2
      src/main/java/com/bomostory/sceneeditmodule/basicdata/Actor.kt
  3. 7 0
      src/main/java/com/bomostory/sceneeditmodule/basicdata/Dialogue.kt
  4. 1 0
      src/main/java/com/bomostory/sceneeditmodule/basicdata/Scene.kt
  5. 42 0
      src/main/java/com/bomostory/sceneeditmodule/controlbar/ControlBarView.kt
  6. 8 1
      src/main/java/com/bomostory/sceneeditmodule/layermanagement/LayerAdapter.kt
  7. 32 0
      src/main/java/com/bomostory/sceneeditmodule/navigationbar/dialogue/DialogueAdapter.kt
  8. 213 0
      src/main/java/com/bomostory/sceneeditmodule/navigationbar/dialogue/DialogueView.kt
  9. 5 1
      src/main/java/com/bomostory/sceneeditmodule/sceneview/OnTouchBoMoSceneListener.kt
  10. 15 4
      src/main/java/com/bomostory/sceneeditmodule/sceneview/SceneView1.kt
  11. 12 4
      src/main/java/com/bomostory/sceneeditmodule/view/ActorView.kt
  12. 14 0
      src/main/java/com/bomostory/sceneeditmodule/view/DialogueView.kt
  13. 29 29
      src/main/java/com/bomostory/sceneeditmodule/view/EditActorView.kt
  14. 18 7
      src/main/java/com/bomostory/sceneeditmodule/view/LayerView.kt
  15. 14 0
      src/main/res/drawable/ic_btn_layer2_02.xml
  16. 14 0
      src/main/res/drawable/ic_btn_layer3_02.xml
  17. 14 0
      src/main/res/drawable/ic_btn_layer4_02.xml
  18. 11 0
      src/main/res/drawable/ic_btn_layerbg_02.xml
  19. 4 4
      src/main/res/drawable/ic_btn_layercomp_02.xml
  20. 14 0
      src/main/res/drawable/ic_btn_layerswipe_02.xml
  21. 10 0
      src/main/res/drawable/ic_done.xml
  22. 24 0
      src/main/res/drawable/ic_layer2_b.xml
  23. 24 0
      src/main/res/drawable/ic_layer3_b.xml
  24. 24 0
      src/main/res/drawable/ic_layer4_b.xml
  25. 20 0
      src/main/res/drawable/ic_layer_b.xml
  26. 18 0
      src/main/res/drawable/ic_layer_bg_b.xml
  27. 5 0
      src/main/res/drawable/ic_speechbubble_b1.xml
  28. 5 0
      src/main/res/drawable/ic_speechbubble_b2.xml
  29. 5 0
      src/main/res/drawable/ic_speechbubble_b3.xml
  30. 5 0
      src/main/res/drawable/ic_speechbubble_b4.xml
  31. 5 0
      src/main/res/drawable/ic_speechbubble_b5.xml
  32. 5 0
      src/main/res/drawable/ic_speechbubble_b6.xml
  33. 5 0
      src/main/res/drawable/ic_speechbubble_b7.xml
  34. 5 0
      src/main/res/drawable/ic_speechbubble_g1.xml
  35. 5 0
      src/main/res/drawable/ic_speechbubble_g2.xml
  36. 5 0
      src/main/res/drawable/ic_speechbubble_g3.xml
  37. 5 0
      src/main/res/drawable/ic_speechbubble_g4.xml
  38. 5 0
      src/main/res/drawable/ic_speechbubble_g5.xml
  39. 5 0
      src/main/res/drawable/ic_speechbubble_g6.xml
  40. 5 0
      src/main/res/drawable/ic_speechbubble_g7.xml
  41. 5 0
      src/main/res/drawable/ic_speechbubble_r1.xml
  42. 5 0
      src/main/res/drawable/ic_speechbubble_r2.xml
  43. 5 0
      src/main/res/drawable/ic_speechbubble_r3.xml
  44. 5 0
      src/main/res/drawable/ic_speechbubble_r4.xml
  45. 5 0
      src/main/res/drawable/ic_speechbubble_r5.xml
  46. 5 0
      src/main/res/drawable/ic_speechbubble_r6.xml
  47. 5 0
      src/main/res/drawable/ic_speechbubble_r7.xml
  48. 5 0
      src/main/res/drawable/ic_speechbubble_w1.xml
  49. 5 0
      src/main/res/drawable/ic_speechbubble_w2.xml
  50. 5 0
      src/main/res/drawable/ic_speechbubble_w3.xml
  51. 5 0
      src/main/res/drawable/ic_speechbubble_w4.xml
  52. 5 0
      src/main/res/drawable/ic_speechbubble_w5.xml
  53. 5 0
      src/main/res/drawable/ic_speechbubble_w6.xml
  54. 5 0
      src/main/res/drawable/ic_speechbubble_w7.xml
  55. 20 0
      src/main/res/drawable/ic_swipe_b.xml
  56. 10 4
      src/main/res/layout/actor_view.xml
  57. 13 0
      src/main/res/layout/dialogue_item.xml
  58. 52 0
      src/main/res/layout/dialogue_select_view.xml
  59. 2 2
      src/main/res/layout/navigation_bar_view.xml
  60. 2 0
      src/main/res/layout/scene_control_view.xml

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

@@ -22,15 +22,19 @@ import com.bomostory.sceneeditmodule.navigationbar.actor.SelectActorView
 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.view.SceneView1
 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 java.io.File
 import java.io.FileWriter
 import com.bomostory.sceneeditmodule.utils.FileUtils
+import com.bomostory.sceneeditmodule.view.LayerView
+import android.util.DisplayMetrics
+
+
 
 
 class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener, EditActorView.OnActorChangeListener,
@@ -41,12 +45,14 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
     private var currentSceneIndex = 0
     private var currentLayerIndex = 6
     private var startRecordTime = 0L
+    private var swipeX = 0
     private var record = Record()
     private var resourceThemeBitmap = ArrayList<String>()
     private var resourceActorBitmap = ArrayList<ArrayList<String>>()
     private lateinit var sceneAdapter: SceneAdapter
     private var isRecord = false
     private var layerManagementDialog = LayerManagementDialog()
+    private val monitorSize = DisplayMetrics()
     companion object {
         const val PHOTO_FROM_GALLERY = 1
         const val LAYER_MANAGEMENT = "layer_management"
@@ -54,6 +60,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
         const val ACTOR_WIDTH = 200
         const val ACTOR_INIT_POSITION_X = 200
         const val ACTOR_INIT_POSITION_Y = 200
+        const val BACKGROUND_MOVE_RATE = 32
     }
 
     override fun onCreate(savedInstanceState: Bundle?) {
@@ -66,8 +73,10 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
         project = Gson().fromJson<Project>(intent.getStringExtra("project"), Project::class.java)
         resourceThemeBitmap = project.sceneResource as ArrayList<String>
         resourceActorBitmap = project.actorResource as ArrayList<ArrayList<String>>
+        windowManager.defaultDisplay.getMetrics(monitorSize)
         project.story?.let {
             it.scenes?.let{
+                it[0].sceneWidth = monitorSize.widthPixels
                 sceneEditView.scene = it[0]
             }
         }
@@ -94,10 +103,12 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
 
     private fun initControlBarView() {
         controlBarView.setBtnSelected(6)
+        switchToPreViewLayer()
         controlBarView.setonClickSwipeLayerBtn(View.OnClickListener {
             switchToPreViewLayer()
         })
         controlBarView.setonClickLayerSceneBtn(View.OnClickListener {
+            controlBarView.setBtnSelected(5)
             layerManagementDialog = LayerManagementDialog()
             project.story?.let {
                 it.scenes?.let{
@@ -140,7 +151,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
 
                     })
                     navigationBarView.setonClickDialogueBtn(View.OnClickListener {
-
+                        initDialogueView()
                     })
                     navigationBarView.setonClickImageBtn(View.OnClickListener {
                         pickFromGallery()
@@ -173,9 +184,8 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
                         } catch (e: Exception) {
                             e.printStackTrace()
                         }
-                        val story = project.story
                         val intent = Intent(this, MovieEditActivity::class.java)
-                        intent.putExtra(MovieEditActivity.PROJECT_KEY, Gson().toJson(story))
+                        intent.putExtra(MovieEditActivity.PROJECT_KEY, Gson().toJson(project))
                         startActivity(intent)
                     })
                     navigationBar.addView(recordFinishView)
@@ -184,6 +194,17 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
         }
     }
 
+    private fun initDialogueView(){
+        if (viewContainer.getChildAt(0) is DialogueView) {
+            viewContainer.removeAllViews()
+            return
+        }
+        var dialogueView = DialogueView(this)
+        switchLayer(0)
+        sceneEditView.findViewById<LayerView>(currentLayerIndex).setOnDragListener(dragListener())
+        viewContainer.addView(dialogueView)
+    }
+
     private fun initActorRecyclerView() {
         if (viewContainer.getChildAt(0) is SelectActorView) {
             viewContainer.removeAllViews()
@@ -324,7 +345,9 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
             }
         }
         sceneEditView.setOnTouchListener(null)
+        sceneEditView.x = 0
         setActorDropLayer()
+        sceneEditView.setLayerVisible(layerIndex)
     }
 
     private fun switchToPreViewLayer(){
@@ -345,6 +368,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
         val boMoSceneListener = OnTouchBoMoSceneListener()
         boMoSceneListener.setCallBack(this)
         sceneEditView.setOnTouchListener(boMoSceneListener)
+        sceneEditView.x = 0
         if (viewContainer.getChildAt(0) is SelectActorView) {
             viewContainer.removeAllViews()
         }
@@ -415,6 +439,24 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
         setActorDropLayer()
     }
 
+    private fun addDialogue(positionX: Int, positionY: Int, resource: Int) {
+        project.story?.let {
+            it.scenes?.let{
+                val dialog = Dialogue()
+                dialog.resource = resource
+                dialog.positionX = positionX
+                dialog.positionY = positionY
+                dialog.positionZ = it[currentSceneIndex].layers[currentLayerIndex].actors.size
+                dialog.sideLength = ACTOR_WIDTH
+                dialog.sideHeight = ACTOR_HEIGHT
+                dialog.parentLayerIndex = currentLayerIndex
+                dialog.isMoveable = true
+                it[currentSceneIndex].layers[currentLayerIndex].actors.add(dialog)
+                sceneEditView.scene = it[currentSceneIndex]
+            }
+        }
+        sceneEditView.findViewById<LayerView>(currentLayerIndex).setOnDragListener(dragListener())
+    }
     override fun onActorDropFinish(positionX: Int, positionY: Int, resourcePath: String) {
         addActor(positionX, positionY, resourcePath)
     }
@@ -433,7 +475,8 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
             it.scenes?.let {
                 for(i in 0 until it[currentSceneIndex].layers[currentLayerIndex].actors.size){
                     if(actor.positionZ == i) {
-                        it[currentSceneIndex].layers[currentLayerIndex].actors[i] = actor
+                        it[currentSceneIndex].layers[currentLayerIndex].actors[i].isSelect =
+                                !it[currentSceneIndex].layers[currentLayerIndex].actors[i].isSelect
                     } else {
                         it[currentSceneIndex].layers[currentLayerIndex].actors[i].isSelect = false
                     }
@@ -448,7 +491,8 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
             it.scenes?.let {
                 for(i in 0 until it[currentSceneIndex].layers[currentLayerIndex].actors.size){
                     if(actor.positionZ == i) {
-                        it[currentSceneIndex].layers[currentLayerIndex].actors[i] = actor
+                        it[currentSceneIndex].layers[currentLayerIndex].actors[i].isSelect =
+                                !it[currentSceneIndex].layers[currentLayerIndex].actors[i].isSelect
                     } else {
                         it[currentSceneIndex].layers[currentLayerIndex].actors[i].isSelect = false
                     }
@@ -518,17 +562,27 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
 
 
     override fun onSceneMove(dX: Int) {
-        sceneEditView.x = dX
-        if (isRecord){
-            record?.tracks.let {
-                val track = Track()
-                track.positionX = dX
-                track.time = System.currentTimeMillis() - startRecordTime
-                record.tracks.add(track)
+        if ( (BACKGROUND_MOVE_RATE * 69) >= (swipeX + dX) && (swipeX + dX) > (-(BACKGROUND_MOVE_RATE * 69))) {
+            sceneEditView.x = swipeX + dX
+            if (isRecord) {
+                record?.tracks.let {
+                    val track = Track()
+                    track.positionX = dX
+                    track.time = System.currentTimeMillis() - startRecordTime
+                    record.tracks.add(track)
+                }
             }
         }
     }
 
+    override fun onSceneReadyToMove() {
+        swipeX = sceneEditView.x
+    }
+
+    override fun onSceneFinishMove() {
+        swipeX = 0
+    }
+
     override fun onDismiss(dialog: DialogInterface?) {
         project.story?.let {
             it.scenes?.let {
@@ -578,4 +632,19 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
             }
         }
     }
+
+    private fun dragListener() : View.OnDragListener {
+        return View.OnDragListener {v, event ->
+            when (event.action) {
+                DragEvent.ACTION_DRAG_STARTED -> {
+                    return@OnDragListener true
+                }
+                DragEvent.ACTION_DROP -> {
+                    addDialogue(event.x.toInt() - 100, event.y.toInt() - 100, event.clipData.getItemAt(0).text.toString().toInt())
+                    return@OnDragListener true
+                }
+            }
+            return@OnDragListener true
+        }
+    }
 }

+ 2 - 2
src/main/java/com/bomostory/sceneeditmodule/basicdata/Actor.kt

@@ -1,7 +1,7 @@
 package com.bomostory.sceneeditmodule.basicdata
 
-class Actor {
-    var resourcePath: String? = null
+open class Actor {
+    open var resourcePath: String? = null
     var positionX: Int = 0
     var positionY: Int = 0
     var positionZ: Int = 0

+ 7 - 0
src/main/java/com/bomostory/sceneeditmodule/basicdata/Dialogue.kt

@@ -0,0 +1,7 @@
+package com.bomostory.sceneeditmodule.basicdata
+
+class Dialogue: Actor(){
+    var resource: Int = 0
+    var textPositionX: Int = 0
+    var textPositionY: Int = 0
+}

+ 1 - 0
src/main/java/com/bomostory/sceneeditmodule/basicdata/Scene.kt

@@ -11,4 +11,5 @@ class Scene {
     var record: Record? = null
     var backgroundPath: String? = null
     var backgroundName: String? = null
+    var sceneWidth: Int = 0
 }

+ 42 - 0
src/main/java/com/bomostory/sceneeditmodule/controlbar/ControlBarView.kt

@@ -30,73 +30,115 @@ class ControlBarView : LinearLayout {
         when (layer) {
             6 -> {
                 swipe_btn.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                swipe_btn.setImageResource(R.drawable.ic_swipe_b)
                 layer_background.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_background.setImageResource(R.drawable.ic_layer_bg_w)
                 layer_4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_4.setImageResource(R.drawable.ic_layer_4_w)
                 layer_3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_3.setImageResource(R.drawable.ic_layer_3_w)
                 layer_2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_2.setImageResource(R.drawable.ic_layer_2_w)
                 layer_1.setBackgroundResource(R.drawable.layer_icon_background)
                 layer_1.setImageResource(R.drawable.ic_layer_1_w)
                 scene_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                scene_btn.setImageResource(R.drawable.ic_layer_w)
             }
             0 -> {
                 swipe_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                swipe_btn.setImageResource(R.drawable.ic_swipe_w)
                 layer_background.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                layer_background.setImageResource(R.drawable.ic_layer_bg_b)
                 layer_4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_4.setImageResource(R.drawable.ic_layer_4_w)
                 layer_3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_3.setImageResource(R.drawable.ic_layer_3_w)
                 layer_2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_2.setImageResource(R.drawable.ic_layer_2_w)
                 layer_1.setBackgroundResource(R.drawable.layer_icon_background)
                 layer_1.setImageResource(R.drawable.ic_layer_1_w)
                 scene_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                scene_btn.setImageResource(R.drawable.ic_layer_w)
             }
             4 -> {
                 swipe_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                swipe_btn.setImageResource(R.drawable.ic_swipe_w)
                 layer_background.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_background.setImageResource(R.drawable.ic_layer_bg_w)
                 layer_4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_4.setImageResource(R.drawable.ic_layer_4_w)
                 layer_3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_3.setImageResource(R.drawable.ic_layer_3_w)
                 layer_2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_2.setImageResource(R.drawable.ic_layer_2_w)
                 layer_1.setBackgroundResource(R.drawable.layer_icon_selected_background)
                 layer_1.setImageResource(R.drawable.ic_layer_1_b)
                 scene_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                scene_btn.setImageResource(R.drawable.ic_layer_w)
             }
             3 -> {
                 swipe_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                swipe_btn.setImageResource(R.drawable.ic_swipe_w)
                 layer_background.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_background.setImageResource(R.drawable.ic_layer_bg_w)
                 layer_4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_4.setImageResource(R.drawable.ic_layer_4_w)
                 layer_3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_3.setImageResource(R.drawable.ic_layer_3_w)
                 layer_2.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                layer_2.setImageResource(R.drawable.ic_layer2_b)
                 layer_1.setBackgroundResource(R.drawable.layer_icon_background)
                 layer_1.setImageResource(R.drawable.ic_layer_1_w)
                 scene_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                scene_btn.setImageResource(R.drawable.ic_layer_w)
             }
             2 -> {
                 swipe_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                swipe_btn.setImageResource(R.drawable.ic_swipe_w)
                 layer_background.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_background.setImageResource(R.drawable.ic_layer_bg_w)
                 layer_4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_4.setImageResource(R.drawable.ic_layer_4_w)
                 layer_3.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                layer_3.setImageResource(R.drawable.ic_layer3_b)
                 layer_2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_2.setImageResource(R.drawable.ic_layer_2_w)
                 layer_1.setBackgroundResource(R.drawable.layer_icon_background)
                 layer_1.setImageResource(R.drawable.ic_layer_1_w)
                 scene_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                scene_btn.setImageResource(R.drawable.ic_layer_w)
             }
             1 -> {
                 swipe_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                swipe_btn.setImageResource(R.drawable.ic_swipe_w)
                 layer_background.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_background.setImageResource(R.drawable.ic_layer_bg_w)
                 layer_4.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                layer_4.setImageResource(R.drawable.ic_layer4_b)
                 layer_3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_3.setImageResource(R.drawable.ic_layer_3_w)
                 layer_2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_2.setImageResource(R.drawable.ic_layer_2_w)
                 layer_1.setBackgroundResource(R.drawable.layer_icon_background)
                 layer_1.setImageResource(R.drawable.ic_layer_1_w)
                 scene_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                scene_btn.setImageResource(R.drawable.ic_layer_w)
             }
             5 -> {
                 swipe_btn.setBackgroundResource(R.drawable.layer_icon_background)
+                swipe_btn.setImageResource(R.drawable.ic_swipe_w)
                 layer_background.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_background.setImageResource(R.drawable.ic_layer_bg_w)
                 layer_4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_4.setImageResource(R.drawable.ic_layer_4_w)
                 layer_3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_3.setImageResource(R.drawable.ic_layer_3_w)
                 layer_2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer_2.setImageResource(R.drawable.ic_layer_2_w)
                 layer_1.setBackgroundResource(R.drawable.layer_icon_background)
                 layer_1.setImageResource(R.drawable.ic_layer_1_w)
                 scene_btn.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                scene_btn.setImageResource(R.drawable.ic_layer_b)
             }
         }
     }

+ 8 - 1
src/main/java/com/bomostory/sceneeditmodule/layermanagement/LayerAdapter.kt

@@ -4,6 +4,7 @@ import android.graphics.drawable.Drawable
 import android.support.v7.widget.RecyclerView
 import android.view.*
 import com.bomostory.sceneeditmodule.basicdata.Actor
+import com.bomostory.sceneeditmodule.basicdata.Dialogue
 import com.example.tfat.myapplication.R
 import kotlinx.android.synthetic.main.actor_item.view.*
 
@@ -27,7 +28,13 @@ class LayerAdapter (actorData: ArrayList<Actor>, actorListeners: ArrayList<View.
 
     class ViewHolder (view : View) : RecyclerView.ViewHolder(view) {
         fun bind(actor: Actor, onTouchListener: View.OnTouchListener?) {
-            itemView.actor_image.setImageDrawable(Drawable.createFromPath(actor.resourcePath))
+            when (actor is Dialogue){
+                true -> {
+                    val dialogue = actor as Dialogue
+                    itemView.actor_image.setImageResource(dialogue.resource)
+                }
+                false -> itemView.actor_image.setImageDrawable(Drawable.createFromPath(actor.resourcePath))
+            }
             itemView.setOnTouchListener(onTouchListener)
         }
     }

+ 32 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/dialogue/DialogueAdapter.kt

@@ -0,0 +1,32 @@
+package com.bomostory.sceneeditmodule.navigationbar.dialogue
+
+import android.support.v7.widget.RecyclerView
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.example.tfat.myapplication.R
+import kotlinx.android.synthetic.main.item_actor.view.*
+
+class DialogueAdapter(var data: ArrayList<Int>, var onTouchListeners: ArrayList<View.OnTouchListener>): RecyclerView.Adapter<DialogueAdapter.ViewHolder>() {
+
+
+    override fun getItemCount(): Int {
+        return data.size
+    }
+
+    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
+        holder.bind(data?.get(position), onTouchListeners[position])
+    }
+
+    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): DialogueAdapter.ViewHolder {
+        val v1 = LayoutInflater.from(parent.context).inflate(R.layout.dialogue_item, parent, false)
+        return ViewHolder(v1)
+    }
+
+    class ViewHolder (view : View) : RecyclerView.ViewHolder(view) {
+        fun bind(dialogueResource: Int, onTouchListener: View.OnTouchListener) {
+            itemView.actor_image.setImageResource(dialogueResource)
+            itemView.actor_image.setOnTouchListener(onTouchListener)
+        }
+    }
+}

+ 213 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/dialogue/DialogueView.kt

@@ -0,0 +1,213 @@
+package com.bomostory.sceneeditmodule.navigationbar.dialogue
+
+import android.content.ClipData
+import android.content.ClipDescription
+import android.content.Context
+import android.support.v7.widget.LinearLayoutManager
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.view.MotionEvent
+import android.view.View
+import android.widget.ImageView
+import android.widget.LinearLayout
+import com.example.tfat.myapplication.R
+import kotlinx.android.synthetic.main.dialogue_select_view.view.*
+
+class DialogueView: LinearLayout{
+    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 var dialogueData = ArrayList<Int>()
+    private var dialogueListeners = ArrayList<View.OnTouchListener>()
+    private var dialogueAdapter = DialogueAdapter(dialogueData, dialogueListeners)
+
+    private fun initView(){
+        val inflater = LayoutInflater.from(context)
+        inflater.inflate(R.layout.dialogue_select_view, this, true)
+        rv_dialogue_view.apply {
+            adapter = dialogueAdapter
+            layoutManager = LinearLayoutManager(context).apply {
+                orientation = LinearLayoutManager.HORIZONTAL
+            }
+        }
+        this.dialogueData.apply {
+            clear()
+            add(R.drawable.ic_speechbubble_w1)
+            add(R.drawable.ic_speechbubble_w2)
+            add(R.drawable.ic_speechbubble_w3)
+            add(R.drawable.ic_speechbubble_w4)
+            add(R.drawable.ic_speechbubble_w5)
+            add(R.drawable.ic_speechbubble_w6)
+            add(R.drawable.ic_speechbubble_w7)
+
+        }
+        this.dialogueListeners.apply {
+            clear()
+            for (i in 0 until dialogueData.size){
+                add(boMoOnTouchListener(dialogueData[i]))
+            }
+        }
+        setDialogueWhite()
+        dialogueAdapter.notifyDataSetChanged()
+        iv_dialogue_view_white.setOnClickListener {
+            this.dialogueData.apply {
+                clear()
+                add(R.drawable.ic_speechbubble_w1)
+                add(R.drawable.ic_speechbubble_w2)
+                add(R.drawable.ic_speechbubble_w3)
+                add(R.drawable.ic_speechbubble_w4)
+                add(R.drawable.ic_speechbubble_w5)
+                add(R.drawable.ic_speechbubble_w6)
+                add(R.drawable.ic_speechbubble_w7)
+
+            }
+            this.dialogueListeners.apply {
+                clear()
+                for (i in 0 until dialogueData.size){
+                    add(boMoOnTouchListener(dialogueData[i]))
+                }
+            }
+            setDialogueWhite()
+            dialogueAdapter.notifyDataSetChanged()
+        }
+        iv_dialogue_view_blue.setOnClickListener {
+            this.dialogueData.apply {
+                clear()
+                add(R.drawable.ic_speechbubble_b1)
+                add(R.drawable.ic_speechbubble_b2)
+                add(R.drawable.ic_speechbubble_b3)
+                add(R.drawable.ic_speechbubble_b4)
+                add(R.drawable.ic_speechbubble_b5)
+                add(R.drawable.ic_speechbubble_b6)
+                add(R.drawable.ic_speechbubble_b7)
+            }
+            this.dialogueListeners.apply {
+                clear()
+                for (i in 0 until dialogueData.size){
+                    add(boMoOnTouchListener(dialogueData[i]))
+                }
+            }
+            setDialogueBlue()
+            dialogueAdapter.notifyDataSetChanged()
+        }
+        iv_dialogue_view_yellow.setOnClickListener {
+            this.dialogueData.apply {
+                clear()
+                add(R.drawable.ic_speechbubble_b1)
+                add(R.drawable.ic_speechbubble_w2)
+                add(R.drawable.ic_speechbubble_w3)
+            }
+            this.dialogueListeners.apply {
+                clear()
+                for (i in 0 until dialogueData.size){
+                    add(boMoOnTouchListener(dialogueData[i]))
+                }
+            }
+            setDialogueYellow()
+            dialogueAdapter.notifyDataSetChanged()
+        }
+        iv_dialogue_view_green.setOnClickListener {
+            this.dialogueData.apply {
+                clear()
+                add(R.drawable.ic_speechbubble_g1)
+                add(R.drawable.ic_speechbubble_g2)
+                add(R.drawable.ic_speechbubble_g3)
+                add(R.drawable.ic_speechbubble_g4)
+                add(R.drawable.ic_speechbubble_g5)
+                add(R.drawable.ic_speechbubble_g6)
+                add(R.drawable.ic_speechbubble_g7)
+            }
+            this.dialogueListeners.apply {
+                clear()
+                for (i in 0 until dialogueData.size){
+                    add(boMoOnTouchListener(dialogueData[i]))
+                }
+            }
+            setDialogueGreen()
+            dialogueAdapter.notifyDataSetChanged()
+        }
+        iv_dialogue_view_orange.setOnClickListener {
+            this.dialogueData.apply {
+                clear()
+                add(R.drawable.ic_speechbubble_r1)
+                add(R.drawable.ic_speechbubble_r2)
+                add(R.drawable.ic_speechbubble_r3)
+                add(R.drawable.ic_speechbubble_r4)
+                add(R.drawable.ic_speechbubble_r5)
+                add(R.drawable.ic_speechbubble_r6)
+                add(R.drawable.ic_speechbubble_r7)
+            }
+            this.dialogueListeners.apply {
+                clear()
+                for (i in 0 until dialogueData.size){
+                    add(boMoOnTouchListener(dialogueData[i]))
+                }
+            }
+            setDialogueOrange()
+            dialogueAdapter.notifyDataSetChanged()
+        }
+    }
+
+    private fun setDialogueWhite(){
+        iv_dialogue_view_white.setImageResource(R.drawable.ic_done)
+        iv_dialogue_view_blue.setImageDrawable(null)
+        iv_dialogue_view_yellow.setImageDrawable(null)
+        iv_dialogue_view_green.setImageDrawable(null)
+        iv_dialogue_view_orange.setImageDrawable(null)
+    }
+
+    private fun setDialogueBlue(){
+        iv_dialogue_view_white.setImageDrawable(null)
+        iv_dialogue_view_blue.setImageResource(R.drawable.ic_done)
+        iv_dialogue_view_yellow.setImageDrawable(null)
+        iv_dialogue_view_green.setImageDrawable(null)
+        iv_dialogue_view_orange.setImageDrawable(null)
+    }
+
+    private fun setDialogueYellow(){
+        iv_dialogue_view_white.setImageDrawable(null)
+        iv_dialogue_view_blue.setImageDrawable(null)
+        iv_dialogue_view_yellow.setImageResource(R.drawable.ic_done)
+        iv_dialogue_view_green.setImageDrawable(null)
+        iv_dialogue_view_orange.setImageDrawable(null)
+    }
+
+    private fun setDialogueGreen(){
+        iv_dialogue_view_white.setImageDrawable(null)
+        iv_dialogue_view_blue.setImageDrawable(null)
+        iv_dialogue_view_yellow.setImageDrawable(null)
+        iv_dialogue_view_green.setImageResource(R.drawable.ic_done)
+        iv_dialogue_view_orange.setImageDrawable(null)
+    }
+    private fun setDialogueOrange(){
+        iv_dialogue_view_white.setImageDrawable(null)
+        iv_dialogue_view_blue.setImageDrawable(null)
+        iv_dialogue_view_yellow.setImageDrawable(null)
+        iv_dialogue_view_green.setImageDrawable(null)
+        iv_dialogue_view_orange.setImageResource(R.drawable.ic_done)
+    }
+
+    private fun boMoOnTouchListener(resource: Int) : View.OnTouchListener {
+        return View.OnTouchListener { view, motionEvent ->
+            when (motionEvent.action) {
+                MotionEvent.ACTION_DOWN -> {
+                    val item = ClipData.Item(resource.toString())
+                    val mimeTypes = arrayOf(ClipDescription.MIMETYPE_TEXT_PLAIN)
+                    val dragData = ClipData(null, mimeTypes, item)
+                    val shadow = View.DragShadowBuilder(view.findViewById<ImageView>(R.id.actor_image))
+                    view.findViewById<ImageView>(R.id.actor_image).startDrag(dragData, shadow, null, View.DRAG_FLAG_GLOBAL)
+                }
+            }
+            return@OnTouchListener true
+        }
+    }
+}

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

@@ -12,6 +12,7 @@ class OnTouchBoMoSceneListener : View.OnTouchListener{
             when (event?.action) {
                 MotionEvent.ACTION_DOWN -> {
                     positionX = event.x
+                    onSceneMoveCallBack?.onSceneReadyToMove()
                 }
                 MotionEvent.ACTION_MOVE -> {
                     dX = (event.rawX - positionX).toInt()
@@ -19,7 +20,7 @@ class OnTouchBoMoSceneListener : View.OnTouchListener{
 
                 }
                 MotionEvent.ACTION_UP -> {
-
+                    onSceneMoveCallBack?.onSceneFinishMove()
                 }
             }
         return true
@@ -30,7 +31,10 @@ class OnTouchBoMoSceneListener : View.OnTouchListener{
     }
     interface OnSceneMoveListener{
         fun onSceneMove(dX: Int)
+        fun onSceneReadyToMove()
+        fun onSceneFinishMove()
     }
+
 }
 
 

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

@@ -4,13 +4,15 @@ import android.content.Context
 import android.graphics.drawable.Drawable
 import android.support.constraint.ConstraintLayout
 import android.util.AttributeSet
-import android.util.Log
+import android.view.View
 import com.bomostory.sceneeditmodule.basicdata.Scene
 import kotlin.math.pow
 
+
+
 class SceneView1 : ConstraintLayout {
 
-    var backgroundView: LayerView? = null
+    private var backgroundView: LayerView? = null
 
     var scene: Scene? = null
         set(value) {
@@ -19,13 +21,13 @@ class SceneView1 : ConstraintLayout {
                 removeAllViews()
 
                 backgroundView = LayerView(context)
-                backgroundView?.layoutParams = LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT)
+                backgroundView?.layoutParams = LayoutParams(it.sceneWidth + 69,LayoutParams.MATCH_PARENT)
                 backgroundView?.background = Drawable.createFromPath(it.backgroundPath)
                 addView(backgroundView)
 
                 for (layer in it.layers) {
                     val layerView = LayerView(context)
-                    layerView.layoutParams = LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT)
+                    layerView.layoutParams = LayoutParams(it.sceneWidth + 69,LayoutParams.MATCH_PARENT)
                     layerView.id = layer.id
                     layerView.editActors = layer.actors
                     addView(layerView)
@@ -60,6 +62,15 @@ class SceneView1 : ConstraintLayout {
             }
         }
 
+    fun setLayerVisible(layerNum: Int){
+        scene?.let {
+            for (layer in it.layers) {
+                val layerView = findViewById<LayerView>(layer.id)
+                if (layer.id < layerNum) layerView.visibility = View.INVISIBLE
+                else layerView.visibility = View.VISIBLE
+            }
+        }
+    }
     constructor(context: Context) : super(context)
 
     constructor(context: Context, attrs: AttributeSet) : super(context, attrs)

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

@@ -1,25 +1,33 @@
 package com.bomostory.sceneeditmodule.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
 import com.bomostory.sceneeditmodule.basicdata.Actor
+import com.bomostory.sceneeditmodule.basicdata.Dialogue
 
 class ActorView : ImageView {
     var actor: Actor? = null
         set(value) {
             value?.let {
-                setImageDrawable(Drawable.createFromPath(it.resourcePath))
-                //setOnTouchListener(onActorTouchListener)
+                when (it is Dialogue){
+                    true -> {
+                        val dialogue =it as Dialogue
+                        setImageResource(dialogue.resource)
+                    }
+                    false -> setImageDrawable(Drawable.createFromPath(it.resourcePath))
+                }
             }
         }
 
-    //var onActorTouchListener: OnTouchListener? = null
-
     constructor(context: Context) : super(context)
 
     constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
 
     constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle)
+
 }

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

@@ -0,0 +1,14 @@
+package com.bomostory.sceneeditmodule.view
+
+import android.content.Context
+import android.util.AttributeSet
+
+class DialogueView : EditActorView {
+
+    constructor(context: Context) : super(context)
+
+    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
+
+    constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle)
+
+}

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

@@ -15,7 +15,7 @@ import android.graphics.Paint
 import com.bomostory.sceneeditmodule.basicdata.Actor
 
 
-class EditActorView @JvmOverloads constructor(
+open class EditActorView @JvmOverloads constructor(
         context: Context,
         attrs: AttributeSet? = null,
         defStyleAttr: Int = 0): RelativeLayout(context, attrs, defStyleAttr) {
@@ -26,7 +26,6 @@ class EditActorView @JvmOverloads constructor(
         set(value) {
             value?.let {
                 field = value
-                isSelect = it.isSelect
                 actor_view_layout.actor = it
                 val layoutParams = RelativeLayout.LayoutParams(it.sideLength, it.sideHeight)
                 layoutParams.leftMargin = it.positionX
@@ -37,17 +36,9 @@ class EditActorView @JvmOverloads constructor(
                 when(it.isMoveable) {
                     true -> actor_view_layout.setOnTouchListener(actorOnTouchListener())
                 }
-            }
-        }
-
-    var isSelect: Boolean = false
-        set(value) {
-            value?.let {
-                field = value
-                if (it) {
-                    change_size_view.visibility = View.VISIBLE
-                } else {
-                    change_size_view.visibility = View.GONE
+                when(it.isSelect){
+                    true -> change_size_view.visibility = View.VISIBLE
+                    false -> change_size_view.visibility = View.GONE
                 }
             }
         }
@@ -79,7 +70,7 @@ class EditActorView @JvmOverloads constructor(
                     positionEnd = (motionEvent.y).toInt()
                 }
                 MotionEvent.ACTION_MOVE -> {
-                    if (!(Math.abs(motionEvent.x - positionStart) < 10 && Math.abs(motionEvent.y - positionEnd) < 10) && isSelect) {
+                    if (!(Math.abs(motionEvent.x - positionStart) < 10 && Math.abs(motionEvent.y - positionEnd) < 10) && actor.isSelect) {
                         mx = motionEvent.rawX.toInt() - positionStart
                         my = motionEvent.rawY.toInt() - positionEnd
                         var laParams = actor_layout.layoutParams as RelativeLayout.LayoutParams
@@ -93,13 +84,11 @@ class EditActorView @JvmOverloads constructor(
                 }
                 MotionEvent.ACTION_UP -> {
                     if (Math.abs(motionEvent.x - positionStart) < 10 && Math.abs(motionEvent.y - positionEnd) < 10 && (System.currentTimeMillis() - clickPeriod) > 1000) {
-                        actor.isSelect = !actor.isSelect
                         actorCallback?.onActorLongClick(actor)
                     } else if (Math.abs(motionEvent.x - positionStart) < 10 && Math.abs(motionEvent.y - positionEnd) < 10) {
-                        actor.isSelect = !actor.isSelect
                         actorCallback?.onActorSelected(actor)
                     } else {
-                        if (isSelect){
+                        if (actor.isSelect){
                             actorCallback?.onActorChange(actor)
                         }
                     }
@@ -130,9 +119,13 @@ class EditActorView @JvmOverloads constructor(
                 MotionEvent.ACTION_MOVE -> {
                     var mx =  motionEvent.rawX.toInt() - positionX
                     var my =  motionEvent.rawY.toInt() - positionY
+                    var dP = when (Math.abs(mx) > Math.abs(my)){
+                        true ->  my
+                        false -> mx
+                    }
                     var actorData = actor
-                    actorData.sideLength = sizeX + mx
-                    actorData.sideHeight = sizeY + my
+                    actorData.sideLength = sizeX + dP
+                    actorData.sideHeight = sizeY + dP
                     actorData.positionX = x
                     actorData.positionY = y
                     actor = actorData
@@ -165,13 +158,17 @@ class EditActorView @JvmOverloads constructor(
                     positionY = (motionEvent.rawY).toInt()
                 }
                 MotionEvent.ACTION_MOVE -> {
-                    var mx =  motionEvent.rawX.toInt() - positionX
-                    var my =  motionEvent.rawY.toInt() - positionY
+                    val mx =  motionEvent.rawX.toInt() - positionX
+                    val my =  motionEvent.rawY.toInt() - positionY
+                    var dP = when (Math.abs(mx) > Math.abs(my)){
+                        true ->  my
+                        false -> mx
+                    }
                     var actorData = actor
-                    actorData.sideLength = sizeX - mx
-                    actorData.sideHeight = sizeY - my
-                    actorData.positionX = x + mx
-                    actorData.positionY = y + my
+                    actorData.sideLength = sizeX - dP
+                    actorData.sideHeight = sizeY - dP
+                    actorData.positionX = x + dP
+                    actorData.positionY = y + dP
                     actor = actorData
                 }
                 MotionEvent.ACTION_UP -> {
@@ -204,6 +201,10 @@ class EditActorView @JvmOverloads constructor(
                 MotionEvent.ACTION_MOVE -> {
                     var mx =  motionEvent.rawX.toInt() - positionX
                     var my =  motionEvent.rawY.toInt() - positionY
+                    var dP = when (Math.abs(mx) > Math.abs(my)){
+                        true ->  my
+                        false -> mx
+                    }
                     var actorData = actor
                     actorData.sideLength = sizeX + mx
                     actorData.sideHeight = sizeY - my
@@ -260,21 +261,20 @@ class EditActorView @JvmOverloads constructor(
     override fun onDraw(canvas: Canvas?) {
         super.onDraw(canvas)
         val mPaint = Paint()
-        if(isSelect) {
-            setLayerType(LAYER_TYPE_SOFTWARE, null)
+        if(actor.isSelect) {
             mPaint.style = Paint.Style.STROKE
             mPaint.strokeWidth = 5f
             mPaint.isAntiAlias = true
             mPaint.color = Color.parseColor("#4e342e")
             mPaint.pathEffect = DashPathEffect(floatArrayOf(8f, 8f), 0f)
-            canvas?.drawLine(actor.positionX.toFloat() + 25, actor.positionY.toFloat() + 25, actor.positionX.toFloat() + 25, actor.positionY.toFloat() + actor.sideHeight.toFloat() - 25 , mPaint)
+            canvas?.drawLine(actor.positionX.toFloat() + 25 , actor.positionY.toFloat() + 25, actor.positionX.toFloat() + 25, actor.positionY.toFloat() + 25 + actor.sideHeight , mPaint)
             canvas?.drawLine(actor.positionX.toFloat() + 25, actor.positionY.toFloat() + 25, actor.positionX.toFloat() + actor.sideLength.toFloat() - 25, actor.positionY.toFloat() + 25, mPaint)
             canvas?.drawLine(actor.positionX.toFloat() + 25, actor.positionY.toFloat() + actor.sideHeight.toFloat() - 25, actor.positionX.toFloat()  + actor.sideLength.toFloat() + 25, actor.positionY.toFloat() + actor.sideHeight.toFloat() - 25, mPaint)
             canvas?.drawLine(actor.positionX.toFloat() + actor.sideLength.toFloat() - 25, actor.positionY.toFloat() + 25, actor.positionX.toFloat() + actor.sideLength.toFloat() - 25, actor.positionY.toFloat() + actor.sideHeight.toFloat() - 25, mPaint)
         }
     }
 
-    interface OnActorChangeListener{
+    interface OnActorChangeListener {
         fun onActorChange(actor: Actor)
         fun onActorSelected(actor: Actor)
         fun onActorLongClick(actor: Actor)

+ 18 - 7
src/main/java/com/bomostory/sceneeditmodule/view/LayerView.kt

@@ -5,6 +5,7 @@ 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 {
@@ -31,13 +32,23 @@ class LayerView : RelativeLayout {
     var editActors = ArrayList<Actor>()
         set(value) {
             for (actor in value) {
-                val actorView = EditActorView(context)
-                actorView.actorCallback = context as EditActorView.OnActorChangeListener
-                addView(actorView)
-                val layoutParams = RelativeLayout.LayoutParams(actor.sideLength, actor.sideLength)
-                layoutParams.leftMargin = actor.positionX
-                layoutParams.topMargin = actor.positionY
-                actorView.actor = actor
+                if (actor is Dialogue){
+                    var dialogueView = DialogueView(context)
+                    dialogueView.actorCallback = context as EditActorView.OnActorChangeListener
+                    addView(dialogueView)
+                    val layoutParams = RelativeLayout.LayoutParams(actor.sideLength, actor.sideLength)
+                    layoutParams.leftMargin = actor.positionX
+                    layoutParams.topMargin = actor.positionY
+                    dialogueView.actor = actor
+                } else if (actor is Actor) {
+                    var actorView = EditActorView(context)
+                    actorView.actorCallback = context as EditActorView.OnActorChangeListener
+                    addView(actorView)
+                    val layoutParams = RelativeLayout.LayoutParams(actor.sideLength, actor.sideLength)
+                    layoutParams.leftMargin = actor.positionX
+                    layoutParams.topMargin = actor.positionY
+                    actorView.actor = actor
+                }
             }
         }
 }

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

@@ -0,0 +1,14 @@
+<vector android:height="24dp" android:viewportHeight="48"
+    android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha=".9" android:fillColor="#FFF"
+        android:fillType="evenOdd" android:pathData="M0,24C0,12.9543 8.9581,4 20.0087,4L48,4L48,44L20.0087,44C8.9582,44 0,35.0481 0,24L0,24Z"/>
+    <path android:fillAlpha="0.3" android:fillColor="#212121"
+        android:fillType="nonZero"
+        android:pathData="M33,17L19,17L19,31L33,31L33,17ZM29,23C29,24.11 28.1,25 27,25L25,25L25,27L29,27L29,29L23,29L23,25C23,23.89 23.9,23 25,23L27,23L27,21L23,21L23,19L27,19C28.1,19 29,19.89 29,21L29,23Z" android:strokeAlpha="0.3"/>
+    <path android:fillAlpha="0.6" android:fillColor="#212121"
+        android:fillType="nonZero"
+        android:pathData="M19,33L33,33C34.1,33 35,32.1 35,31L35,17C35,15.9 34.1,15 33,15L19,15C17.9,15 17,15.9 17,17L17,31C17,32.1 17.9,33 19,33ZM19,17L33,17L33,31L19,31L19,17Z" android:strokeAlpha="0.6"/>
+    <path android:fillAlpha="0.6" android:fillColor="#212121"
+        android:fillType="nonZero"
+        android:pathData="M27,19L23,19L23,21L27,21L27,23L25,23C23.9,23 23,23.89 23,25L23,29L29,29L29,27L25,27L25,25L27,25C28.1,25 29,24.11 29,23L29,21C29,19.89 28.1,19 27,19Z" android:strokeAlpha="0.6"/>
+</vector>

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

@@ -0,0 +1,14 @@
+<vector android:height="24dp" android:viewportHeight="48"
+    android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha=".9" android:fillColor="#FFF"
+        android:fillType="evenOdd" android:pathData="M0,24C0,12.9543 8.9581,4 20.0087,4L48,4L48,44L20.0087,44C8.9582,44 0,35.0481 0,24L0,24Z"/>
+    <path android:fillAlpha="0.3" android:fillColor="#212121"
+        android:fillType="nonZero"
+        android:pathData="M19,31L33,31L33,17L19,17L19,31ZM23,27L27,27L27,25L25,25L25,23L27,23L27,21L23,21L23,19L27,19C28.1,19 29,19.89 29,21L29,22.5C29,23.33 28.33,24 27.5,24C28.33,24 29,24.67 29,25.5L29,27C29,28.11 28.1,29 27,29L23,29L23,27Z" android:strokeAlpha="0.3"/>
+    <path android:fillAlpha="0.6" android:fillColor="#212121"
+        android:fillType="nonZero"
+        android:pathData="M33,15L19,15C17.9,15 17,15.9 17,17L17,31C17,32.1 17.9,33 19,33L33,33C34.1,33 35,32.1 35,31L35,17C35,15.9 34.1,15 33,15ZM33,31L19,31L19,17L33,17L33,31Z" android:strokeAlpha="0.6"/>
+    <path android:fillAlpha="0.6" android:fillColor="#212121"
+        android:fillType="nonZero"
+        android:pathData="M29,27L29,25.5C29,24.67 28.33,24 27.5,24C28.33,24 29,23.33 29,22.5L29,21C29,19.89 28.1,19 27,19L23,19L23,21L27,21L27,23L25,23L25,25L27,25L27,27L23,27L23,29L27,29C28.1,29 29,28.11 29,27Z" android:strokeAlpha="0.6"/>
+</vector>

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

@@ -0,0 +1,14 @@
+<vector android:height="24dp" android:viewportHeight="48"
+    android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha=".9" android:fillColor="#FFF"
+        android:fillType="evenOdd" android:pathData="M0,24C0,12.9543 8.9581,4 20.0087,4L48,4L48,44L20.0087,44C8.9582,44 0,35.0481 0,24L0,24Z"/>
+    <path android:fillAlpha="0.3" android:fillColor="#212121"
+        android:fillType="nonZero"
+        android:pathData="M19,31L33,31L33,17L19,17L19,31L19,31ZM27,29L29,29L29,19L27,19L27,23L25,23L25,19L23,19L23,25L27,25L27,29Z" android:strokeAlpha="0.3"/>
+    <path android:fillAlpha="0.6" android:fillColor="#212121"
+        android:fillType="nonZero"
+        android:pathData="M33,15L19,15C17.9,15 17,15.9 17,17L17,31C17,32.1 17.9,33 19,33L33,33C34.1,33 35,32.1 35,31L35,17C35,15.9 34.1,15 33,15ZM33,31L19,31L19,17L33,17L33,31Z" android:strokeAlpha="0.6"/>
+    <path android:fillAlpha="0.6" android:fillColor="#212121"
+        android:fillType="nonZero"
+        android:pathData="M27,29l2,0l0,-10l-2,0l0,4l-2,0l0,-4l-2,0l0,6l4,0z" android:strokeAlpha="0.6"/>
+</vector>

+ 11 - 0
src/main/res/drawable/ic_btn_layerbg_02.xml

@@ -0,0 +1,11 @@
+<vector android:height="24dp" android:viewportHeight="48"
+    android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha=".9" android:fillColor="#FFF"
+        android:fillType="evenOdd" android:pathData="M0,24C0,12.9543 8.9581,4 20.0087,4L48,4L48,44L20.0087,44C8.9582,44 0,35.0481 0,24L0,24Z"/>
+    <path android:fillAlpha="0.3" android:fillColor="#000"
+        android:fillType="nonZero"
+        android:pathData="M19,28l3.04,0l-1.52,-2.03z" android:strokeAlpha="0.3"/>
+    <path android:fillAlpha="0.6" android:fillColor="#000"
+        android:fillType="nonZero"
+        android:pathData="M23.78,23.63L25.03,25.3L28,21.33L33,28L24.54,28L20.53,22.63L15,30L37,30L28,18L23.78,23.63ZM19,28L20.52,25.97L22.04,28L19,28Z" android:strokeAlpha="0.6"/>
+</vector>

+ 4 - 4
src/main/res/drawable/ic_btn_layercomp_02.xml

@@ -1,14 +1,14 @@
 <vector android:height="24dp" android:viewportHeight="48"
     android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
     <path android:fillAlpha=".9" android:fillColor="#FFF"
-        android:fillType="evenOdd" android:pathData="M0,24C0,12.954 8.958,4 20.009,4H48v40H20.009C8.959,44 0,35.048 0,24z"/>
+        android:fillType="evenOdd" android:pathData="M0,24C0,12.9543 8.9581,4 20.0087,4L48,4L48,44L20.0087,44C8.9582,44 0,35.0481 0,24L0,24Z"/>
     <path android:fillAlpha="0.3" android:fillColor="#212121"
         android:fillType="nonZero"
-        android:pathData="M20.26,21L26,25.47 31.74,21 26,16.53z" android:strokeAlpha="0.3"/>
+        android:pathData="M20.26,21l5.74,4.47l5.74,-4.47l-5.74,-4.47z" android:strokeAlpha="0.3"/>
     <path android:fillAlpha="0.6" android:fillColor="#212121"
         android:fillType="nonZero"
-        android:pathData="M33.37,24.8l-7.38,5.74 -7.37,-5.73L17,26.07l9,7 9,-7z" android:strokeAlpha="0.6"/>
+        android:pathData="M33.37,24.8l-7.38,5.74l-7.37,-5.73l-1.62,1.26l9,7l9,-7z" android:strokeAlpha="0.6"/>
     <path android:fillAlpha="0.6" android:fillColor="#212121"
         android:fillType="nonZero"
-        android:pathData="M26,14l-9,7 1.63,1.27L26,28l7.36,-5.73L35,21l-9,-7zM26,25.47L20.26,21 26,16.53 31.74,21 26,25.47z" android:strokeAlpha="0.6"/>
+        android:pathData="M26,14L17,21L18.63,22.27L26,28L33.36,22.27L35,21L26,14ZM26,25.47L20.26,21L26,16.53L31.74,21L26,25.47Z" android:strokeAlpha="0.6"/>
 </vector>

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


+ 10 - 0
src/main/res/drawable/ic_done.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="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"
+      android:fillColor="#4E342E"
+      android:fillType="nonZero"/>
+</vector>

+ 24 - 0
src/main/res/drawable/ic_layer2_b.xml

@@ -0,0 +1,24 @@
+<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="M19,5L5,5L5,19L19,19L19,5ZM15,11C15,12.11 14.1,13 13,13L11,13L11,15L15,15L15,17L9,17L9,13C9,11.89 9.9,11 11,11L13,11L13,9L9,9L9,7L13,7C14.1,7 15,7.89 15,9L15,11Z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#212121"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M5,21L19,21C20.1,21 21,20.1 21,19L21,5C21,3.9 20.1,3 19,3L5,3C3.9,3 3,3.9 3,5L3,19C3,20.1 3.9,21 5,21ZM5,5L19,5L19,19L5,19L5,5Z"
+      android:strokeAlpha="0.6"
+      android:fillColor="#212121"
+      android:fillType="nonZero"
+      android:fillAlpha="0.6"/>
+  <path
+      android:pathData="M13,7L9,7L9,9L13,9L13,11L11,11C9.9,11 9,11.89 9,13L9,17L15,17L15,15L11,15L11,13L13,13C14.1,13 15,12.11 15,11L15,9C15,7.89 14.1,7 13,7Z"
+      android:strokeAlpha="0.6"
+      android:fillColor="#212121"
+      android:fillType="nonZero"
+      android:fillAlpha="0.6"/>
+</vector>

+ 24 - 0
src/main/res/drawable/ic_layer3_b.xml

@@ -0,0 +1,24 @@
+<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,19L19,19L19,5L5,5L5,19ZM9,15L13,15L13,13L11,13L11,11L13,11L13,9L9,9L9,7L13,7C14.1,7 15,7.89 15,9L15,10.5C15,11.33 14.33,12 13.5,12C14.33,12 15,12.67 15,13.5L15,15C15,16.11 14.1,17 13,17L9,17L9,15Z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#212121"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M19,3L5,3C3.9,3 3,3.9 3,5L3,19C3,20.1 3.9,21 5,21L19,21C20.1,21 21,20.1 21,19L21,5C21,3.9 20.1,3 19,3ZM19,19L5,19L5,5L19,5L19,19Z"
+      android:strokeAlpha="0.6"
+      android:fillColor="#212121"
+      android:fillType="nonZero"
+      android:fillAlpha="0.6"/>
+  <path
+      android:pathData="M15,15L15,13.5C15,12.67 14.33,12 13.5,12C14.33,12 15,11.33 15,10.5L15,9C15,7.89 14.1,7 13,7L9,7L9,9L13,9L13,11L11,11L11,13L13,13L13,15L9,15L9,17L13,17C14.1,17 15,16.11 15,15Z"
+      android:strokeAlpha="0.6"
+      android:fillColor="#212121"
+      android:fillType="nonZero"
+      android:fillAlpha="0.6"/>
+</vector>

+ 24 - 0
src/main/res/drawable/ic_layer4_b.xml

@@ -0,0 +1,24 @@
+<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,19L19,19L19,5L5,5L5,19L5,19ZM13,17L15,17L15,7L13,7L13,11L11,11L11,7L9,7L9,13L13,13L13,17Z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#212121"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M19,3L5,3C3.9,3 3,3.9 3,5L3,19C3,20.1 3.9,21 5,21L19,21C20.1,21 21,20.1 21,19L21,5C21,3.9 20.1,3 19,3ZM19,19L5,19L5,5L19,5L19,19Z"
+      android:strokeAlpha="0.6"
+      android:fillColor="#212121"
+      android:fillType="nonZero"
+      android:fillAlpha="0.6"/>
+  <path
+      android:pathData="M13,17l2,0l0,-10l-2,0l0,4l-2,0l0,-4l-2,0l0,6l4,0z"
+      android:strokeAlpha="0.6"
+      android:fillColor="#212121"
+      android:fillType="nonZero"
+      android:fillAlpha="0.6"/>
+</vector>

+ 20 - 0
src/main/res/drawable/ic_layer_b.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:pathData="M6.26,9L12,13.47 17.74,9 12,4.53z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#000"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M19.37,12.8l-7.38,5.74 -7.37,-5.73L3,14.07l9,7 9,-7z"
+      android:fillColor="#000"
+      android:fillType="nonZero"/>
+  <path
+      android:pathData="M12,2L3,9l1.63,1.27L12,16l7.36,-5.73L21,9l-9,-7zM12,13.47L6.26,9 12,4.53 17.74,9 12,13.47z"
+      android:fillColor="#000"
+      android:fillType="nonZero"/>
+</vector>

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

@@ -0,0 +1,18 @@
+<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,16l3.04,0l-1.52,-2.03z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#000"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M9.78,11.63L11.03,13.3L14,9.33L19,16L10.54,16L6.53,10.63L1,18L23,18L14,6L9.78,11.63ZM5,16L6.52,13.97L8.04,16L5,16Z"
+      android:strokeAlpha="0.6"
+      android:fillColor="#000"
+      android:fillType="nonZero"
+      android:fillAlpha="0.6"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M96,0H4C1.8,0 0,1.8 0,4v72c0,2.2 1.8,4 4,4h92c2.2,0 4,-1.8 4,-4V4C100,1.8 98.2,0 96,0L96,0z"/>
+    <path android:fillColor="#73E4FF" android:pathData="M96,1c1.7,0 3,1.3 3,3v72c0,1.7 -1.3,3 -3,3H4c-1.7,0 -3,-1.3 -3,-3V4c0,-1.7 1.3,-3 3,-3H96"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,17.9 0,40s22.4,40 50,40s50,-17.9 50,-40S77.6,0 50,0L50,0z"/>
+    <path android:fillColor="#73E4FF" android:pathData="M50,1c27,0 49,17.5 49,39S77,79 50,79S1,61.5 1,40S23,1 50,1"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M91.2,0H8.9C4,0 0,3.6 0,8v48.1c0,4.4 4,8 8.9,8h50.4L78.8,80l-2.6,-15.8h14.9c4.9,0 8.9,-3.6 8.9,-8V8C100.1,3.6 96.1,0 91.2,0L91.2,0z"/>
+    <path android:fillColor="#73E4FF" android:pathData="M91.2,1c2.3,0 4.4,0.9 5.9,2.4C98.4,4.7 99,6.3 99,8v48.2c0,3.9 -3.6,7 -7.9,7H76.2H75l0.2,1.2l2.2,13.2L60,63.3l-0.3,-0.2h-0.4H8.9c-4.4,0 -7.9,-3.1 -7.9,-7V8c0,-3.9 3.6,-7 7.9,-7H91.2"/>
+</vector>

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


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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="81"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,15.5 0,34.6C0,51.8 17.8,66 41.3,68.8c4.9,8.5 13,10.4 18.4,11.2c-6.2,-4.9 -6,-10.8 -6,-10.8C79.6,67.9 100,53 100,34.6C100,15.5 77.6,0 50,0L50,0z"/>
+    <path android:fillColor="#73E4FF" android:pathData="M50,1c27,0 49,15.1 49,33.6c0,8.5 -4.6,16.6 -13,22.9c-8.5,6.3 -20,10.1 -32.4,10.7h-0.9v0.9c0,0.2 -0.1,4.7 3.9,9.2c-5.1,-1.2 -10.7,-3.7 -14.4,-10.1l-0.3,-0.4l-0.5,-0.1C18,65 1,51.1 1,34.6C1,16.1 23,1 50,1"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,15.8 0,35.3s22.4,35.3 50,35.3s50,-15.8 50,-35.3S77.6,0 50,0L50,0zM85.1,64.8c-3.1,0 -5.6,2 -5.6,4.4s2.5,4.4 5.6,4.4s5.6,-2 5.6,-4.4C90.7,66.7 88.2,64.8 85.1,64.8L85.1,64.8zM90.5,74.6c-2,0 -3.7,1.2 -3.7,2.7s1.7,2.7 3.7,2.7s3.7,-1.2 3.7,-2.7C94.2,75.8 92.5,74.6 90.5,74.6L90.5,74.6z"/>
+    <path android:fillColor="#73E4FF" android:pathData="M50,1c27,0 49,15.4 49,34.3S77,69.6 50,69.6S1,54.2 1,35.3S23,1 50,1M85.1,65.8c2.5,0 4.6,1.5 4.6,3.4s-2.1,3.4 -4.6,3.4s-4.6,-1.5 -4.6,-3.4S82.6,65.8 85.1,65.8M90.5,75.6c1.4,0 2.7,0.8 2.7,1.7c0,0.9 -1.3,1.7 -2.7,1.7s-2.7,-0.8 -2.7,-1.7S89.1,75.6 90.5,75.6"/>
+</vector>

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


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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M96,0H4C1.8,0 0,1.8 0,4v72c0,2.2 1.8,4 4,4h92c2.2,0 4,-1.8 4,-4V4C100,1.8 98.2,0 96,0L96,0z"/>
+    <path android:fillColor="#B9FF73" android:pathData="M96,1c1.7,0 3,1.3 3,3v72c0,1.7 -1.3,3 -3,3H4c-1.7,0 -3,-1.3 -3,-3V4c0,-1.7 1.3,-3 3,-3H96"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,17.9 0,40s22.4,40 50,40s50,-17.9 50,-40S77.6,0 50,0L50,0z"/>
+    <path android:fillColor="#B9FF73" android:pathData="M50,1c27,0 49,17.5 49,39S77,79 50,79S1,61.5 1,40S23,1 50,1"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M91.2,0H8.9C4,0 0,3.6 0,8v48.1c0,4.4 4,8 8.9,8h50.4L78.8,80l-2.6,-15.8h14.9c4.9,0 8.9,-3.6 8.9,-8V8C100.1,3.6 96.1,0 91.2,0L91.2,0z"/>
+    <path android:fillColor="#B9FF73" android:pathData="M91.2,1c2.3,0 4.4,0.9 5.9,2.4C98.4,4.7 99,6.3 99,8v48.2c0,3.9 -3.6,7 -7.9,7H76.2H75l0.2,1.2l2.2,13.2L60,63.3l-0.3,-0.2h-0.4H8.9c-4.4,0 -7.9,-3.1 -7.9,-7V8c0,-3.9 3.6,-7 7.9,-7H91.2"/>
+</vector>

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


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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="81"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,15.5 0,34.6C0,51.8 17.8,66 41.3,68.8c4.9,8.5 13,10.4 18.4,11.2c-6.2,-4.9 -6,-10.8 -6,-10.8C79.6,67.9 100,53 100,34.6C100,15.5 77.6,0 50,0L50,0z"/>
+    <path android:fillColor="#B9FF73" android:pathData="M50,1c27,0 49,15.1 49,33.6c0,8.5 -4.6,16.6 -13,22.9c-8.5,6.3 -20,10.1 -32.4,10.7h-0.9v0.9c0,0.2 -0.1,4.7 3.9,9.2c-5.1,-1.2 -10.7,-3.7 -14.4,-10.1l-0.3,-0.4l-0.5,-0.1C18,65 1,51.1 1,34.6C1,16.1 23,1 50,1"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,15.8 0,35.3s22.4,35.3 50,35.3s50,-15.8 50,-35.3S77.6,0 50,0L50,0zM85.1,64.8c-3.1,0 -5.6,2 -5.6,4.4s2.5,4.4 5.6,4.4s5.6,-2 5.6,-4.4C90.7,66.7 88.2,64.8 85.1,64.8L85.1,64.8zM90.5,74.6c-2,0 -3.7,1.2 -3.7,2.7s1.7,2.7 3.7,2.7s3.7,-1.2 3.7,-2.7C94.2,75.8 92.5,74.6 90.5,74.6L90.5,74.6z"/>
+    <path android:fillColor="#B9FF73" android:pathData="M50,1c27,0 49,15.4 49,34.3S77,69.6 50,69.6S1,54.2 1,35.3S23,1 50,1M85.1,65.8c2.5,0 4.6,1.5 4.6,3.4s-2.1,3.4 -4.6,3.4s-4.6,-1.5 -4.6,-3.4S82.6,65.8 85.1,65.8M90.5,75.6c1.4,0 2.7,0.8 2.7,1.7c0,0.9 -1.3,1.7 -2.7,1.7s-2.7,-0.8 -2.7,-1.7S89.1,75.6 90.5,75.6"/>
+</vector>

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


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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M96,0H4C1.8,0 0,1.8 0,4v72c0,2.2 1.8,4 4,4h92c2.2,0 4,-1.8 4,-4V4C100,1.8 98.2,0 96,0L96,0z"/>
+    <path android:fillColor="#FF9573" android:pathData="M96,1c1.7,0 3,1.3 3,3v72c0,1.7 -1.3,3 -3,3H4c-1.7,0 -3,-1.3 -3,-3V4c0,-1.7 1.3,-3 3,-3H96"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,17.9 0,40s22.4,40 50,40s50,-17.9 50,-40S77.6,0 50,0L50,0z"/>
+    <path android:fillColor="#FF9573" android:pathData="M50,1c27,0 49,17.5 49,39S77,79 50,79S1,61.5 1,40S23,1 50,1"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M91.2,0H8.9C4,0 0,3.6 0,8v48.1c0,4.4 4,8 8.9,8h50.4L78.8,80l-2.6,-15.8h14.9c4.9,0 8.9,-3.6 8.9,-8V8C100.1,3.6 96.1,0 91.2,0L91.2,0z"/>
+    <path android:fillColor="#FF9573" android:pathData="M91.2,1c2.3,0 4.4,0.9 5.9,2.4C98.4,4.7 99,6.3 99,8v48.2c0,3.9 -3.6,7 -7.9,7H76.2H75l0.2,1.2l2.2,13.2L60,63.3l-0.3,-0.2h-0.4H8.9c-4.4,0 -7.9,-3.1 -7.9,-7V8c0,-3.9 3.6,-7 7.9,-7H91.2"/>
+</vector>

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


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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="81"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,15.5 0,34.6C0,51.8 17.8,66 41.3,68.8c4.9,8.5 13,10.4 18.4,11.2c-6.2,-4.9 -6,-10.8 -6,-10.8C79.6,67.9 100,53 100,34.6C100,15.5 77.6,0 50,0L50,0z"/>
+    <path android:fillColor="#FF9573" android:pathData="M50,1c27,0 49,15.1 49,33.6c0,8.5 -4.6,16.6 -13,22.9c-8.5,6.3 -20,10.1 -32.4,10.7h-0.9v0.9c0,0.2 -0.1,4.7 3.9,9.2c-5.1,-1.2 -10.7,-3.7 -14.4,-10.1l-0.3,-0.4l-0.5,-0.1C18,65 1,51.1 1,34.6C1,16.1 23,1 50,1"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,15.8 0,35.3s22.4,35.3 50,35.3s50,-15.8 50,-35.3S77.6,0 50,0L50,0zM85.1,64.8c-3.1,0 -5.6,2 -5.6,4.4s2.5,4.4 5.6,4.4s5.6,-2 5.6,-4.4C90.7,66.7 88.2,64.8 85.1,64.8L85.1,64.8zM90.5,74.6c-2,0 -3.7,1.2 -3.7,2.7s1.7,2.7 3.7,2.7s3.7,-1.2 3.7,-2.7C94.2,75.8 92.5,74.6 90.5,74.6L90.5,74.6z"/>
+    <path android:fillColor="#FF9573" android:pathData="M50,1c27,0 49,15.4 49,34.3S77,69.6 50,69.6S1,54.2 1,35.3S23,1 50,1M85.1,65.8c2.5,0 4.6,1.5 4.6,3.4s-2.1,3.4 -4.6,3.4s-4.6,-1.5 -4.6,-3.4S82.6,65.8 85.1,65.8M90.5,75.6c1.4,0 2.7,0.8 2.7,1.7c0,0.9 -1.3,1.7 -2.7,1.7s-2.7,-0.8 -2.7,-1.7S89.1,75.6 90.5,75.6"/>
+</vector>

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


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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M96,0H4C1.8,0 0,1.8 0,4v72c0,2.2 1.8,4 4,4h92c2.2,0 4,-1.8 4,-4V4C100,1.8 98.2,0 96,0L96,0z"/>
+    <path android:fillColor="#FFFFFF" android:pathData="M96,1c1.7,0 3,1.3 3,3v72c0,1.7 -1.3,3 -3,3H4c-1.7,0 -3,-1.3 -3,-3V4c0,-1.7 1.3,-3 3,-3H96"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,17.9 0,40s22.4,40 50,40s50,-17.9 50,-40S77.6,0 50,0L50,0z"/>
+    <path android:fillColor="#FFFFFF" android:pathData="M50,1c27,0 49,17.5 49,39S77,79 50,79S1,61.5 1,40S23,1 50,1"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M91.2,0H8.9C4,0 0,3.6 0,8v48.1c0,4.4 4,8 8.9,8h50.4L78.8,80l-2.6,-15.8h14.9c4.9,0 8.9,-3.6 8.9,-8V8C100.1,3.6 96.1,0 91.2,0L91.2,0z"/>
+    <path android:fillColor="#FFFFFF" android:pathData="M91.2,1c2.3,0 4.4,0.9 5.9,2.4C98.4,4.7 99,6.3 99,8v48.2c0,3.9 -3.6,7 -7.9,7H76.2H75l0.2,1.2l2.2,13.2L60,63.3l-0.3,-0.2h-0.4H8.9c-4.4,0 -7.9,-3.1 -7.9,-7V8c0,-3.9 3.6,-7 7.9,-7H91.2"/>
+</vector>

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


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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="81"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,15.5 0,34.6C0,51.8 17.8,66 41.3,68.8c4.9,8.5 13,10.4 18.4,11.2c-6.2,-4.9 -6,-10.8 -6,-10.8C79.6,67.9 100,53 100,34.6C100,15.5 77.6,0 50,0L50,0z"/>
+    <path android:fillColor="#FFFFFF" android:pathData="M50,1c27,0 49,15.1 49,33.6c0,8.5 -4.6,16.6 -13,22.9c-8.5,6.3 -20,10.1 -32.4,10.7h-0.9v0.9c0,0.2 -0.1,4.7 3.9,9.2c-5.1,-1.2 -10.7,-3.7 -14.4,-10.1l-0.3,-0.4l-0.5,-0.1C18,65 1,51.1 1,34.6C1,16.1 23,1 50,1"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="80"
+    android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#212121" android:pathData="M50,0C22.4,0 0,15.8 0,35.3s22.4,35.3 50,35.3s50,-15.8 50,-35.3S77.6,0 50,0L50,0zM85.1,64.8c-3.1,0 -5.6,2 -5.6,4.4s2.5,4.4 5.6,4.4s5.6,-2 5.6,-4.4C90.7,66.7 88.2,64.8 85.1,64.8L85.1,64.8zM90.5,74.6c-2,0 -3.7,1.2 -3.7,2.7s1.7,2.7 3.7,2.7s3.7,-1.2 3.7,-2.7C94.2,75.8 92.5,74.6 90.5,74.6L90.5,74.6z"/>
+    <path android:fillColor="#FFFFFF" android:pathData="M50,1c27,0 49,15.4 49,34.3S77,69.6 50,69.6S1,54.2 1,35.3S23,1 50,1M85.1,65.8c2.5,0 4.6,1.5 4.6,3.4s-2.1,3.4 -4.6,3.4s-4.6,-1.5 -4.6,-3.4S82.6,65.8 85.1,65.8M90.5,75.6c1.4,0 2.7,0.8 2.7,1.7c0,0.9 -1.3,1.7 -2.7,1.7s-2.7,-0.8 -2.7,-1.7S89.1,75.6 90.5,75.6"/>
+</vector>

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


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


+ 10 - 4
src/main/res/layout/actor_view.xml

@@ -4,10 +4,16 @@
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     xmlns:android="http://schemas.android.com/apk/res/android">
-    <com.bomostory.sceneeditmodule.view.ActorView
-        android:id="@+id/actor_view_layout"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
+    <RelativeLayout
+        android:id="@+id/layout_edit_actor_view_actor_Image"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content">
+        <com.bomostory.sceneeditmodule.view.ActorView
+            android:id="@+id/actor_view_layout"
+            android:padding="24dp"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+    </RelativeLayout>
     <RelativeLayout
         android:id="@+id/change_size_view"
         android:layout_width="match_parent"

+ 13 - 0
src/main/res/layout/dialogue_item.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/actor"
+    android:paddingRight="42dp"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+    <ImageView
+        android:id="@+id/actor_image"
+        android:scaleType="fitXY"
+        android:layout_width="100dp"
+        android:layout_height="80dp"/>
+</LinearLayout>

+ 52 - 0
src/main/res/layout/dialogue_select_view.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="1024dp"
+    android:layout_height="160dp"
+    android:orientation="vertical"
+    android:layout_above="@+id/navigation_bar"
+    android:background="#212121">
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="56dp"
+        android:paddingTop="16dp"
+        android:paddingLeft="42dp"
+        android:orientation="horizontal">
+        <ImageView
+            android:id="@+id/iv_dialogue_view_white"
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:layout_marginRight="24dp"
+            android:src="@drawable/ic_done"
+            android:background="#ffffff"/>
+        <ImageView
+            android:id="@+id/iv_dialogue_view_yellow"
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:layout_marginRight="24dp"
+            android:background="#fff573"/>
+        <ImageView
+            android:id="@+id/iv_dialogue_view_blue"
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:layout_marginRight="24dp"
+            android:background="#73e4ff"/>
+        <ImageView
+            android:id="@+id/iv_dialogue_view_green"
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:layout_marginRight="24dp"
+            android:background="#b9ff73"/>
+        <ImageView
+            android:id="@+id/iv_dialogue_view_orange"
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:layout_marginRight="24dp"
+            android:background="#ff9573"/>
+    </LinearLayout>
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/rv_dialogue_view"
+        android:paddingLeft="42dp"
+        android:layout_width="match_parent"
+        android:layout_height="160dp">
+    </android.support.v7.widget.RecyclerView>
+</LinearLayout>

+ 2 - 2
src/main/res/layout/navigation_bar_view.xml

@@ -81,7 +81,7 @@
             android:layout_width="104dp"
             android:layout_height="match_parent"
             android:layout_toRightOf="@id/brush">
-            <Button
+            <ImageView
                 android:id="@+id/dialogue_btn"
                 android:layout_margin="7dp"
                 android:layout_width="24dp"
@@ -89,7 +89,7 @@
                 android:scaleType="center"
                 android:background="#212121"
                 android:layout_centerHorizontal="true"
-                android:drawableTop="@drawable/ic_dialogue"/>
+                android:src="@drawable/ic_dialogue"/>
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"

+ 2 - 0
src/main/res/layout/scene_control_view.xml

@@ -18,6 +18,7 @@
         android:id="@+id/duplicate"
         android:layout_width="96dp"
         android:layout_height="64dp"
+        android:layout_marginTop="36dp"
         android:background="@null"
         android:drawableTop="@drawable/ic_duplicate_w"
         android:text="Duplicate"
@@ -29,6 +30,7 @@
         android:id="@+id/addScene"
         android:layout_width="96dp"
         android:layout_height="64dp"
+        android:layout_marginTop="36dp"
         android:layout_marginEnd="24dp"
         android:background="@null"
         android:drawableTop="@drawable/ic_add_w"