faterhenry 6 years ago
commit
0fa4188bca
78 changed files with 2648 additions and 0 deletions
  1. 53 0
      .gitignore
  2. 41 0
      build.gradle
  3. 21 0
      proguard-rules.pro
  4. 26 0
      src/androidTest/java/com/bomostory/sceneeditmodule/ExampleInstrumentedTest.java
  5. 19 0
      src/main/AndroidManifest.xml
  6. 17 0
      src/main/java/com/bomostory/sceneeditmodule/ActorData.kt
  7. 52 0
      src/main/java/com/bomostory/sceneeditmodule/ActorView.kt
  8. 8 0
      src/main/java/com/bomostory/sceneeditmodule/LayerData.kt
  9. 16 0
      src/main/java/com/bomostory/sceneeditmodule/LayerView.kt
  10. 13 0
      src/main/java/com/bomostory/sceneeditmodule/MainActivity.java
  11. 125 0
      src/main/java/com/bomostory/sceneeditmodule/OnTouchBomoSceneListener.kt
  12. 8 0
      src/main/java/com/bomostory/sceneeditmodule/SceneData.kt
  13. 544 0
      src/main/java/com/bomostory/sceneeditmodule/SceneEditActivity.kt
  14. 113 0
      src/main/java/com/bomostory/sceneeditmodule/SceneView.kt
  15. 123 0
      src/main/java/com/bomostory/sceneeditmodule/controlbar/ControlBarView.kt
  16. 14 0
      src/main/java/com/bomostory/sceneeditmodule/controlbar/ControlBarViewModel.kt
  17. 60 0
      src/main/java/com/bomostory/sceneeditmodule/navigationbar/NavigationBarView.kt
  18. 128 0
      src/main/java/com/bomostory/sceneeditmodule/navigationbar/actor/ActorAdapter.kt
  19. 28 0
      src/main/java/com/bomostory/sceneeditmodule/navigationbar/actor/SelectActorView.kt
  20. 34 0
      src/main/java/com/bomostory/sceneeditmodule/navigationbar/scene/AddSceneAdapter.kt
  21. 18 0
      src/main/java/com/bomostory/sceneeditmodule/navigationbar/scene/AddSceneView.kt
  22. 39 0
      src/main/java/com/bomostory/sceneeditmodule/navigationbar/scene/ControlSceneView.kt
  23. 52 0
      src/main/java/com/bomostory/sceneeditmodule/navigationbar/scene/SceneAdapter.kt
  24. BIN
      src/main/res/drawable/green.png
  25. BIN
      src/main/res/drawable/hill.png
  26. 10 0
      src/main/res/drawable/ic_actor.xml
  27. 10 0
      src/main/res/drawable/ic_add_w.xml
  28. 22 0
      src/main/res/drawable/ic_bird_g_1.xml
  29. 16 0
      src/main/res/drawable/ic_brush.xml
  30. 11 0
      src/main/res/drawable/ic_btn_layercomp_01.xml
  31. 14 0
      src/main/res/drawable/ic_btn_layercomp_02.xml
  32. 5 0
      src/main/res/drawable/ic_btn_record.xml
  33. 5 0
      src/main/res/drawable/ic_btn_record_stop.xml
  34. 16 0
      src/main/res/drawable/ic_dialogue.xml
  35. 20 0
      src/main/res/drawable/ic_duplicate_w.xml
  36. 16 0
      src/main/res/drawable/ic_edit_w.xml
  37. 20 0
      src/main/res/drawable/ic_image.xml
  38. 169 0
      src/main/res/drawable/ic_launcher_background.xml
  39. 34 0
      src/main/res/drawable/ic_launcher_foreground.xml
  40. 20 0
      src/main/res/drawable/ic_layer_1_w.xml
  41. 20 0
      src/main/res/drawable/ic_layer_2_w.xml
  42. 20 0
      src/main/res/drawable/ic_layer_3_w.xml
  43. 20 0
      src/main/res/drawable/ic_layer_4_w.xml
  44. 16 0
      src/main/res/drawable/ic_layer_bg_w.xml
  45. 20 0
      src/main/res/drawable/ic_layer_w.xml
  46. 20 0
      src/main/res/drawable/ic_play_circle_w.xml
  47. 16 0
      src/main/res/drawable/ic_scene.xml
  48. 20 0
      src/main/res/drawable/ic_settings.xml
  49. 10 0
      src/main/res/drawable/layer_icon_background.xml
  50. 10 0
      src/main/res/drawable/layer_icon_selected_background.xml
  51. BIN
      src/main/res/drawable/sky.png
  52. 8 0
      src/main/res/layout/activity_main.xml
  53. 60 0
      src/main/res/layout/activity_scene_edit.xml
  54. 36 0
      src/main/res/layout/actor_select_view.xml
  55. 37 0
      src/main/res/layout/add_scene_view.xml
  56. 46 0
      src/main/res/layout/control_bar_view.xml
  57. 27 0
      src/main/res/layout/item_actor.xml
  58. 8 0
      src/main/res/layout/item_add_scene.xml
  59. 35 0
      src/main/res/layout/item_scene.xml
  60. 146 0
      src/main/res/layout/navigation_bar_view.xml
  61. 64 0
      src/main/res/layout/scene_control_view.xml
  62. 21 0
      src/main/res/layout/scene_view.xml
  63. 5 0
      src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  64. 5 0
      src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  65. BIN
      src/main/res/mipmap-hdpi/ic_launcher.png
  66. BIN
      src/main/res/mipmap-hdpi/ic_launcher_round.png
  67. BIN
      src/main/res/mipmap-mdpi/ic_launcher.png
  68. BIN
      src/main/res/mipmap-mdpi/ic_launcher_round.png
  69. BIN
      src/main/res/mipmap-xhdpi/ic_launcher.png
  70. BIN
      src/main/res/mipmap-xhdpi/ic_launcher_round.png
  71. BIN
      src/main/res/mipmap-xxhdpi/ic_launcher.png
  72. BIN
      src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  73. BIN
      src/main/res/mipmap-xxxhdpi/ic_launcher.png
  74. BIN
      src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  75. 7 0
      src/main/res/values/colors.xml
  76. 3 0
      src/main/res/values/strings.xml
  77. 11 0
      src/main/res/values/styles.xml
  78. 17 0
      src/test/java/com/bomostory/sceneeditmodule/ExampleUnitTest.java

+ 53 - 0
.gitignore

@@ -0,0 +1,53 @@
+# Built application files
+*.apk
+*.ap_
+
+# Files for the ART/Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+out/
+
+# Gradle files
+.gradle/
+build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+
+# Android Studio Navigation editor temp files
+.navigation/
+
+# Android Studio captures folder
+captures/
+
+# Intellij
+*.iml
+.idea/
+
+# Keystore files
+*.jks
+
+# Windows thumbnail db
+Thumbs.db
+
+# OSX files
+.DS_Store
+
+# Eclipse project files
+.classpath
+.project
+
+keystore.properties
+*.keystore

+ 41 - 0
build.gradle

@@ -0,0 +1,41 @@
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-android'
+
+android {
+    compileSdkVersion 28
+
+
+
+    defaultConfig {
+        minSdkVersion 21
+        targetSdkVersion 28
+        versionCode 1
+        versionName "1.0"
+
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+
+    }
+
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+
+}
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+    implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
+    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+    implementation 'com.android.support:design:28.0.0-rc02'
+    implementation 'com.android.support:support-v4:28.0.0-rc02'
+    testImplementation 'junit:junit:4.12'
+    androidTestImplementation 'com.android.support.test:runner:1.0.2'
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+}
+repositories {
+    mavenCentral()
+}

+ 21 - 0
proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 26 - 0
src/androidTest/java/com/bomostory/sceneeditmodule/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package com.bomostory.sceneeditmodule;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+    @Test
+    public void useAppContext() {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getTargetContext();
+
+        assertEquals("com.bomostory.sceneeditmodule.test", appContext.getPackageName());
+    }
+}

+ 19 - 0
src/main/AndroidManifest.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.tfat.myapplication">
+
+    <application
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:roundIcon="@mipmap/ic_launcher_round"
+        android:screenOrientation="landscape"
+        android:supportsRtl="true"
+        android:theme="@style/AppTheme">
+        <activity
+            android:name=".SceneEditActivity"
+            android:screenOrientation="landscape">
+        </activity>
+    </application>
+
+</manifest>

+ 17 - 0
src/main/java/com/bomostory/sceneeditmodule/ActorData.kt

@@ -0,0 +1,17 @@
+package com.example.tfat.myapplication
+
+import android.graphics.Bitmap
+
+class ActorData {
+    var bitmap : Bitmap? = null
+    var x = 0
+    var y = 0
+    var size = 0
+
+    constructor(bitmap: Bitmap, x:Int, y:Int, size : Int) {
+        this.x = x
+        this.y = y
+        this.size = size
+        this.bitmap = bitmap
+    }
+}

+ 52 - 0
src/main/java/com/bomostory/sceneeditmodule/ActorView.kt

@@ -0,0 +1,52 @@
+package com.example.tfat.myapplication
+import android.content.Context
+import android.view.MotionEvent
+import android.view.View
+import android.widget.FrameLayout
+import android.widget.ImageView
+import android.widget.RelativeLayout
+
+class ActorView : ImageView{
+    private var actorData : ActorData
+
+    constructor(context : Context, actorData: ActorData) : super(context) {
+        this.setImageBitmap(actorData.bitmap)
+        this.actorData = actorData
+        var lParams = RelativeLayout.LayoutParams(actorData.size, actorData.size)
+        lParams?.setMargins(actorData.x, actorData.y, 0, 0)
+        this.layoutParams = lParams
+        this.setOnTouchListener(actorOnTouchListener())
+    }
+
+    fun actorOnTouchListener() : View.OnTouchListener {
+        var positionStart = 0
+        var positionEnd = 0
+        var mx = 0
+        var my = 0
+        return View.OnTouchListener { view, motionEvent ->
+            when (motionEvent.action) {
+                MotionEvent.ACTION_DOWN -> {
+                    positionStart = (motionEvent.x).toInt()
+                    positionEnd = (motionEvent.y).toInt()
+                }
+                MotionEvent.ACTION_MOVE -> {
+                    mx =  motionEvent.rawX.toInt() - positionStart
+                    my =  motionEvent.rawY.toInt() - positionEnd
+                    var laParams = view.layoutParams as RelativeLayout.LayoutParams
+                    laParams.setMargins(mx,my - 200,0,0)
+                    view.layoutParams = laParams
+                }
+                MotionEvent.ACTION_UP -> {
+                    actorData.x = mx
+                    actorData.y = my
+
+                }
+            }
+            return@OnTouchListener true
+        }
+    }
+
+    fun getData() : ActorData{
+        return actorData
+    }
+}

+ 8 - 0
src/main/java/com/bomostory/sceneeditmodule/LayerData.kt

@@ -0,0 +1,8 @@
+package com.example.tfat.myapplication
+
+class LayerData {
+    var data : ArrayList<ActorData>? = null
+    constructor() {
+        data = ArrayList()
+    }
+}

+ 16 - 0
src/main/java/com/bomostory/sceneeditmodule/LayerView.kt

@@ -0,0 +1,16 @@
+package com.example.tfat.myapplication
+
+import android.content.Context
+import android.widget.FrameLayout
+import android.widget.RelativeLayout
+
+class LayerView : RelativeLayout {
+    var actorViewList = ArrayList<ActorView>()
+    constructor(context : Context) : super(context)
+    constructor(context : Context, actorViewList: ArrayList<ActorView>) : super(context) {
+        this.actorViewList = actorViewList
+        for(actorView in actorViewList){
+            this.addView(actorView)
+        }
+    }
+}

+ 13 - 0
src/main/java/com/bomostory/sceneeditmodule/MainActivity.java

@@ -0,0 +1,13 @@
+package com.bomostory.sceneeditmodule;
+
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+
+
+public class MainActivity extends AppCompatActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
+}

+ 125 - 0
src/main/java/com/bomostory/sceneeditmodule/OnTouchBomoSceneListener.kt

@@ -0,0 +1,125 @@
+package com.example.tfat.myapplication
+
+import android.util.Log
+import android.view.MotionEvent
+import android.view.View
+import android.widget.RelativeLayout
+import org.json.JSONArray
+import org.json.JSONObject
+
+class OnTouchBomoSceneListener : View.OnTouchListener{
+    lateinit var bomoLayer1 : RelativeLayout
+    lateinit var bomo_layer2 : RelativeLayout
+    lateinit var bomo_layer3 : RelativeLayout
+    lateinit var bomo_layer4 : RelativeLayout
+    lateinit var bomo_background : RelativeLayout
+    val RECORD_MODE = 1
+    val EDIT_MODE = 2
+    var isRecord = false
+    var positionStart = 0f
+    var total_x = 0
+    var move_x = 0
+    var tempX = 0
+    var mx = 0
+    var x1 = 0
+    var x2 = 0
+    var x3 = 0
+    var x4 = 0
+    var x5 = 0
+    var recordNum = 0
+    private var recordObject = JSONObject()
+    var startRecordTime = 0L
+    lateinit var positionRecord : JSONObject
+    override fun onTouch(v: View?, event: MotionEvent?): Boolean {
+            when (event?.action) {
+                MotionEvent.ACTION_DOWN -> {
+                    Log.d("TEST12345", "DOWN")
+                    positionStart = event.x
+                    x1 = bomoLayer1.x.toInt()
+                    x2 = bomo_layer2.x.toInt()
+                    x3 = bomo_layer3.x.toInt()
+                    x4 = bomo_layer4.x.toInt()
+                    x5 = bomo_background.x.toInt()
+                }
+                MotionEvent.ACTION_MOVE -> {
+                    //Log.d("TEST12345", "move")
+                    mx = (event.rawX - positionStart).toInt()
+                    if (total_x < 2000 && total_x > -2000) {
+                        bomoLayer1.layout(total_x, bomoLayer1.y.toInt(), total_x + bomoLayer1.width, bomoLayer1.height + bomoLayer1.y.toInt())
+                        bomo_layer2.layout(total_x/2, bomo_layer2.y.toInt(), total_x/ 2 + bomo_layer2.width, bomo_layer2.height + bomo_layer2.y.toInt())
+                        bomo_layer3.layout(total_x /4, bomo_layer3.y.toInt(), total_x / 4 + bomo_layer3.width, bomo_layer3.height + bomo_layer3.y.toInt())
+                        bomo_layer4.layout(total_x/8, bomo_layer4.y.toInt(), total_x / 8 + bomo_layer4.width , bomo_layer4.height + bomo_layer4.y.toInt())
+                        bomo_background.layout(total_x/32, bomo_background.y.toInt(), total_x/ 32 + bomo_background.width, bomo_background.height + bomo_background.y.toInt())
+                        move_x = mx
+                        total_x = mx + tempX
+                    } else {
+                        move_x = mx
+                        if ((total_x <= 2000 && move_x < 0) && (total_x >= -2000) || (total_x >= -2000 && move_x > 0) && (total_x <= 2000)) {
+                            total_x = tempX + move_x
+                        } else if (total_x > 2000 && move_x < 0) {
+                            total_x = tempX + move_x
+                        } else if (total_x < -2000 && move_x > 0) {
+                            total_x = tempX + move_x
+                        }
+                        if (total_x > 2000) {
+                            total_x = 2000
+                        }
+                        if (total_x < -2000) {
+                            total_x = -2000
+                        }
+                    }
+                    Log.d("TEST12345","x = " + total_x)
+
+                    val obj0 = JSONObject()
+                    val jsonObject = JSONObject()
+                    val jsonArray = JSONArray()
+                    obj0.put("time", System.currentTimeMillis() - startRecordTime)
+                    obj0.put("positionX", total_x)
+                    jsonArray.put(obj0)
+                    jsonObject.put("record", jsonArray)
+                    recordObject.put(recordNum.toString(), jsonObject)
+                    recordNum ++
+                }
+                MotionEvent.ACTION_UP -> {
+                    Log.d("TEST12345", "up")
+                    tempX = total_x
+                }
+            }
+        return true
+    }
+
+    fun setLayout(layoutList : ArrayList<LayerView>) {
+        bomo_background = layoutList[0]
+        bomoLayer1 = layoutList[4]
+        bomo_layer2 = layoutList[3]
+        bomo_layer3 = layoutList[2]
+        bomo_layer4 = layoutList[1]
+    }
+
+    fun setMode(isRecord : Boolean){
+        this.isRecord = isRecord
+    }
+
+    fun getRecord() : JSONObject{
+        return recordObject
+    }
+
+    fun startRecordTime(time : Long){
+        startRecordTime = time
+    }
+
+    fun endRecordTime(time : Long){
+        val obj0 = JSONObject()
+        val jsonObject = JSONObject()
+        val jsonArray = JSONArray()
+        obj0.put("time", time - startRecordTime)
+        obj0.put("positionX", total_x)
+        jsonArray.put(obj0)
+        jsonObject.put("record", jsonArray)
+        recordObject.put(recordNum.toString(), jsonObject)
+        recordNum = 0
+        recordObject = JSONObject()
+    }
+}
+
+

+ 8 - 0
src/main/java/com/bomostory/sceneeditmodule/SceneData.kt

@@ -0,0 +1,8 @@
+package com.example.tfat.myapplication
+
+class SceneData {
+    var data : ArrayList<LayerData>? = null
+    constructor() {
+        data = ArrayList()
+    }
+}

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

@@ -0,0 +1,544 @@
+package com.example.tfat.myapplication
+
+import android.support.v7.app.AppCompatActivity
+import android.support.v7.widget.LinearLayoutManager
+import android.os.Bundle
+import android.graphics.Bitmap
+import android.graphics.Canvas
+import android.graphics.drawable.BitmapDrawable
+import android.graphics.drawable.Drawable
+import android.support.v7.widget.RecyclerView
+import android.util.Log
+import android.view.View
+import android.view.WindowManager
+import android.widget.ImageView
+import android.widget.RelativeLayout
+import com.example.tfat.myapplication.controlbar.ControlBarView
+import com.example.tfat.myapplication.navigationbar.NavigationBarView
+import com.example.tfat.myapplication.navigationbar.actor.ActorAdapter
+import com.example.tfat.myapplication.navigationbar.scene.AddSceneAdapter
+import com.example.tfat.myapplication.navigationbar.scene.AddSceneView
+import com.example.tfat.myapplication.navigationbar.scene.ControlSceneView
+import com.example.tfat.myapplication.navigationbar.scene.SceneAdapter
+import com.bomostory.sceneeditmodule.navigationbar.actor.SelectActorView
+import org.json.JSONException
+import org.json.JSONObject
+import org.json.JSONArray
+import android.os.Handler
+
+
+
+class SceneEditActivity : AppCompatActivity() {
+    private lateinit var currentSceneView : SceneView
+    private var currentSceneIndex = 0
+    private var sceneData = ArrayList<JSONObject>()
+    private var resourceThemeBitmap = ArrayList<Int>()
+    private var resourceActorBitmap = ArrayList<ArrayList<Int>>()
+    private lateinit var sceneAdapter : SceneAdapter
+    private lateinit var sceneEditView : RelativeLayout
+    private lateinit var viewContainer :  RelativeLayout
+    private lateinit var selectActorView : SelectActorView
+    private lateinit var controlBarView : ControlBarView
+    private lateinit var navigationBar : RelativeLayout
+    private lateinit var startRecord : ImageView
+    private var isRecord = false
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        setContentView(R.layout.activity_scene_edit)
+        window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+                WindowManager.LayoutParams.FLAG_FULLSCREEN)
+        actionBar?.hide()
+        supportActionBar?.hide()
+        viewContainer = findViewById(R.id.view_container)
+        controlBarView = findViewById(R.id.control_bar_view)
+        navigationBar = findViewById(R.id.navigation_bar)
+        sceneEditView = findViewById(R.id.scene_edit_view)
+        startRecord = findViewById(R.id.start_record)
+        initThemeResource()
+        initActorResource()
+        currentSceneView = SceneView(this, initLayerViewList(), R.drawable.hill, false)
+        sceneData.add(currentSceneIndex, sceneToJSONObject(currentSceneView))
+        sceneEditView.addView(currentSceneView)
+        initControlBarView(currentSceneView)
+        initNavigationBarView()
+        startRecord.setOnClickListener(View.OnClickListener {
+            if(!isRecord){
+                currentSceneView.setOnTouchListener(currentSceneView.onTouchBoMoSceneListener)
+                for (actorView in currentSceneView.getAllActor()) actorView.setOnTouchListener(null)
+                controlBarView.setBtnSelected(5)
+                startRecord.setImageDrawable(resources.getDrawable(R.drawable.ic_btn_record_stop))
+                viewContainer.removeAllViews()
+                navigationBar.visibility = View.INVISIBLE
+                controlBarView.visibility = View.INVISIBLE
+                isRecord = true
+                currentSceneView.setMode(true)
+                currentSceneView.startRecordTime(System.currentTimeMillis())
+            } else {
+                startRecord.setImageDrawable(resources.getDrawable(R.drawable.ic_btn_record))
+                navigationBar.visibility = View.VISIBLE
+                controlBarView.visibility = View.VISIBLE
+                currentSceneView.saveRecord()
+                isRecord = false
+                currentSceneView.setMode(false)
+                currentSceneView.setonClickPlayListener(View.OnClickListener {
+                    preView()
+                })
+                navigationBar.visibility = View.INVISIBLE
+                initControlSceneView()
+                currentSceneView.endRecordTime(System.currentTimeMillis())
+            }
+        })
+    }
+
+    override fun onResume() {
+        super.onResume()
+        window.decorView.apply {
+            systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+                    or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+                    or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+                    or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+                    or View.SYSTEM_UI_FLAG_FULLSCREEN
+                    or View.SYSTEM_UI_FLAG_LOW_PROFILE
+                    or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY)
+        }
+    }
+
+    private fun drawableToBitmap(drawable: Drawable): Bitmap {
+        if (drawable is BitmapDrawable) {
+            return drawable.bitmap
+        }
+        val bitmap = Bitmap.createBitmap(drawable.intrinsicWidth, drawable.intrinsicHeight, Bitmap.Config.ARGB_8888)
+        val canvas = Canvas(bitmap)
+        drawable.setBounds(0, 0, canvas.width, canvas.height)
+        drawable.draw(canvas)
+        return bitmap
+    }
+
+    private fun initLayer(actorViewList: ArrayList<ActorView>): LayerView {
+        return LayerView(this, actorViewList)
+    }
+
+    private fun initNewLayer(): LayerView {
+        return LayerView(this)
+    }
+
+    private fun initLayerViewList(): ArrayList<LayerView> {
+        var layerViewList = ArrayList<LayerView>()
+        for (i in 0..4) {
+            layerViewList.add(initNewLayer())
+        }
+        return layerViewList
+    }
+
+    private fun initActorRecyclerView(sceneView: SceneView) {
+        if(viewContainer.getChildAt(0) is SelectActorView) {
+            viewContainer.removeAllViews()
+            return
+        }
+        var selectActorView = SelectActorView(this)
+        var actorList = ArrayList<ArrayList<Bitmap>>()
+        var bitmaps = ArrayList<Bitmap>()
+        for (i in 0 until resourceActorBitmap.size) {
+            for (j in 0 until resourceActorBitmap[i].size) {
+                bitmaps.add(drawableToBitmap(resources.getDrawable(resourceActorBitmap[i][j])))
+            }
+            actorList.add(bitmaps)
+            bitmaps = ArrayList()
+        }
+        val layoutManager = LinearLayoutManager(this)
+        layoutManager.orientation = LinearLayoutManager.HORIZONTAL
+        var actorAdapter = ActorAdapter(this, actorList, sceneView.getLayerView()[4])
+        actorAdapter.setLayer(sceneView.getLayerView())
+        var actorRecyclerView = selectActorView.findViewById<RecyclerView>(R.id.select_actor_recycler_view)
+        actorRecyclerView.layoutManager = layoutManager
+        actorRecyclerView.adapter = actorAdapter
+        //actorRecyclerView.visibility = View.INVISIBLE
+        viewContainer.removeAllViews()
+        viewContainer.addView(selectActorView)
+        if(viewContainer.getChildAt(0) is SelectActorView) {
+            currentSceneView.setOnTouchListener(null)
+            selectActorView = viewContainer.getChildAt(0) as SelectActorView
+            for (actorView in currentSceneView.getAllActor()) actorView.setOnTouchListener(null)
+            for (actorView in currentSceneView.getActor(4)) actorView.setOnTouchListener(actorView.actorOnTouchListener())
+            var adapter = selectActorView.findViewById<RecyclerView>(R.id.select_actor_recycler_view).adapter as ActorAdapter
+            adapter.setTargetLayer(currentSceneView.getLayerView()[4])
+            controlBarView.setBtnSelected(1)
+        }
+    }
+
+    private fun initControlSceneView() {
+        if(viewContainer.getChildAt(0) is ControlSceneView) {
+            viewContainer.removeAllViews()
+            return
+        }
+        var projectBitmaps = ArrayList<Bitmap>()
+        var onSceneSelectedArrayList = ArrayList<View.OnClickListener>()
+        for (i in 0 until sceneData.size){
+            onSceneSelectedArrayList.add(switchScene(i))
+            projectBitmaps.add(drawableToBitmap(resources.getDrawable(sceneData[i].getInt("background"))))
+        }
+        sceneAdapter = SceneAdapter(this, projectBitmaps, onSceneSelectedArrayList, currentSceneIndex)
+        var controlSceneView = ControlSceneView(this)
+        controlSceneView.setonClickAddBtn(View.OnClickListener {
+            viewContainer.removeAllViews()
+            var addSceneView = AddSceneView(this)
+            viewContainer.addView(addSceneView)
+            val layoutManager = LinearLayoutManager(this)
+            layoutManager.orientation = LinearLayoutManager.HORIZONTAL
+            var onSceneSelectedArrayList = ArrayList<View.OnClickListener>()
+            var bitmapResource = ArrayList<Bitmap>()
+            for (i in 0 until  resourceThemeBitmap.size) {
+                bitmapResource.add(drawableToBitmap(resources.getDrawable(resourceThemeBitmap[i])))
+                onSceneSelectedArrayList.add(addScene(i))
+            }
+            var addSceneAdapter = AddSceneAdapter(this, bitmapResource, onSceneSelectedArrayList)
+            var newSceneRecyclerView = addSceneView.findViewById<RecyclerView>(R.id.new_scene_recycler_view)
+            newSceneRecyclerView.layoutManager = layoutManager
+            newSceneRecyclerView.adapter = addSceneAdapter
+        })
+        controlSceneView.setonClickDuplicateBtn(View.OnClickListener {
+            sceneData.removeAt(currentSceneIndex)
+            sceneData.add(currentSceneIndex, sceneToJSONObject(currentSceneView))
+            var projectBitmaps = ArrayList<Bitmap>()
+            var onSceneSelectedArrayList = ArrayList<View.OnClickListener>()
+            var newSceneView = SceneView(this, loadScene(sceneData[currentSceneIndex]), currentSceneView.getBackgroundTheme(), loadSceneIsRecord(sceneData[currentSceneIndex]))
+            newSceneView.setRecord(sceneData[currentSceneIndex].getJSONObject("record"))
+            sceneData.add(currentSceneIndex + 1, sceneToJSONObject(newSceneView))
+            for (i in 0 until sceneData.size){
+                onSceneSelectedArrayList.add(switchScene(i))
+                projectBitmaps.add(drawableToBitmap(resources.getDrawable(sceneData[i].getInt("background"))))
+            }
+            sceneAdapter.update(projectBitmaps, onSceneSelectedArrayList)
+        })
+        val layoutManager = LinearLayoutManager(this)
+        layoutManager.orientation = LinearLayoutManager.HORIZONTAL
+        var sceneRecyclerView = controlSceneView.findViewById<RecyclerView>(R.id.scene_recycler_view)
+        sceneRecyclerView.layoutManager = layoutManager
+        sceneRecyclerView.adapter = sceneAdapter
+        viewContainer.removeAllViews()
+        viewContainer.addView(controlSceneView)
+    }
+
+    private fun switchScene(position: Int) : View.OnClickListener {
+        return View.OnClickListener {
+            sceneEditView.removeAllViews()
+            sceneData.removeAt(currentSceneIndex)
+            sceneData.add(currentSceneIndex, sceneToJSONObject(currentSceneView))
+            var sceneViewQQ = SceneView(this, loadScene(sceneData[position]), sceneData[position].getInt("background"), sceneData[position].getBoolean("isRecord"))
+            sceneViewQQ.setRecord(sceneData[position].getJSONObject("record"))
+            currentSceneView = sceneViewQQ
+            currentSceneIndex = position
+            sceneEditView.addView(sceneViewQQ)
+            sceneAdapter.updateCurrentScene(currentSceneIndex)
+            initControlBarView(sceneViewQQ)
+            initNavigationBarView()
+            sceneViewQQ.setonClickPlayListener(View.OnClickListener {
+                preView()
+            })
+        }
+    }
+
+    private fun initControlBarView(sceneView: SceneView) {
+        sceneView.setOnTouchListener(sceneView.onTouchBoMoSceneListener)
+        for (actorView in sceneView.getAllActor()) actorView.setOnTouchListener(null)
+        controlBarView.setBtnSelected(5)
+        controlBarView.setonClickLayerSceneBtn(View.OnClickListener {
+            if(viewContainer.getChildAt(0) is SelectActorView) {
+                selectActorView = viewContainer.getChildAt(0) as SelectActorView
+                var adapter = selectActorView.findViewById<RecyclerView>(R.id.select_actor_recycler_view).adapter as ActorAdapter
+                adapter.setTargetLayer(sceneView.getLayerView()[1])
+            }
+            sceneView.setOnTouchListener(sceneView.onTouchBoMoSceneListener)
+            for (actorView in sceneView.getAllActor()) actorView.setOnTouchListener(null)
+            controlBarView.setBtnSelected(5)
+        })
+        controlBarView.setonClickLayerBackgroundBtn(View.OnClickListener {
+            if(viewContainer.getChildAt(0) is SelectActorView) {
+                selectActorView = viewContainer.getChildAt(0) as SelectActorView
+                var adapter = selectActorView.findViewById<RecyclerView>(R.id.select_actor_recycler_view).adapter as ActorAdapter
+                adapter.setTargetLayer(sceneView.getLayerView()[0])
+            }
+            sceneView.setOnTouchListener(null)
+            for (actorView in sceneView.getAllActor()) actorView.setOnTouchListener(null)
+            for (actorView in sceneView.getActor(0)) actorView.setOnTouchListener(actorView.actorOnTouchListener())
+            controlBarView.setBtnSelected(0)
+        })
+        controlBarView.setonClickLayer1Btn(View.OnClickListener {
+            if(viewContainer.getChildAt(0) is SelectActorView) {
+                selectActorView = viewContainer.getChildAt(0) as SelectActorView
+                var adapter = selectActorView.findViewById<RecyclerView>(R.id.select_actor_recycler_view).adapter as ActorAdapter
+                adapter.setTargetLayer(sceneView.getLayerView()[4])
+            }
+            sceneView.setOnTouchListener(null)
+            for (actorView in sceneView.getAllActor()) actorView.setOnTouchListener(null)
+            for (actorView in sceneView.getActor(4)) actorView.setOnTouchListener(actorView.actorOnTouchListener())
+            controlBarView.setBtnSelected(1)
+        })
+        controlBarView.setonClickLayer2Btn(View.OnClickListener {
+            if(viewContainer.getChildAt(0) is SelectActorView) {
+                selectActorView = viewContainer.getChildAt(0) as SelectActorView
+                var adapter = selectActorView.findViewById<RecyclerView>(R.id.select_actor_recycler_view).adapter as ActorAdapter
+                adapter.setTargetLayer(sceneView.getLayerView()[3])
+            }
+            sceneView.setOnTouchListener(null)
+            for (actorView in sceneView.getAllActor()) actorView.setOnTouchListener(null)
+            for (actorView in sceneView.getActor(3)) actorView.setOnTouchListener(actorView.actorOnTouchListener())
+            controlBarView.setBtnSelected(2)
+        })
+        controlBarView.setonClickLayer3Btn(View.OnClickListener {
+            if(viewContainer.getChildAt(0) is SelectActorView) {
+                selectActorView = viewContainer.getChildAt(0) as SelectActorView
+                var adapter = selectActorView.findViewById<RecyclerView>(R.id.select_actor_recycler_view).adapter as ActorAdapter
+                adapter.setTargetLayer(sceneView.getLayerView()[2])
+            }
+            sceneView.setOnTouchListener(null)
+            for (actorView in sceneView.getAllActor()) actorView.setOnTouchListener(null)
+            for (actorView in sceneView.getActor(2)) actorView.setOnTouchListener(actorView.actorOnTouchListener())
+            controlBarView.setBtnSelected(3)
+        })
+        controlBarView.setonClickLayer4Btn(View.OnClickListener {
+            if(viewContainer.getChildAt(0) is SelectActorView) {
+                selectActorView = viewContainer.getChildAt(0) as SelectActorView
+                var adapter = selectActorView.findViewById<RecyclerView>(R.id.select_actor_recycler_view).adapter as ActorAdapter
+                adapter.setTargetLayer(sceneView.getLayerView()[1])
+            }
+            sceneView.setOnTouchListener(null)
+            for (actorView in sceneView.getAllActor()) actorView.setOnTouchListener(null)
+            for (actorView in sceneView.getActor(1)) actorView.setOnTouchListener(actorView.actorOnTouchListener())
+            controlBarView.setBtnSelected(4)
+        })
+    }
+
+    private fun initNavigationBarView() {
+        if (currentSceneView.getIsRecord()){
+            var navigationBarView = NavigationBarView(this)
+            navigationBar.addView(navigationBarView)
+            navigationBarView.setonClickSceneBtn(View.OnClickListener {
+                initControlSceneView()
+            })
+            navigationBarView.setonClickActorBtn(View.OnClickListener {
+                initActorRecyclerView(currentSceneView)
+            })
+            navigationBarView.setonClickBrushBtn(View.OnClickListener {
+                preView()
+            })
+            navigationBarView.setonClickDialogueBtn(View.OnClickListener {
+
+            })
+        } else {
+
+        }
+    }
+
+    private fun sceneToJSONObject(sceneView: SceneView) : JSONObject {
+        var layerViewList = sceneView.getLayerView()
+        val sceneObject = JSONObject()
+        val jsonObject = JSONObject()
+        val jsonArray = JSONArray()
+        val layer1Object = JSONObject()
+        val layer1Actor = JSONArray()
+        val layer2Object = JSONObject()
+        val layer2Actor = JSONArray()
+        val layer3Object = JSONObject()
+        val layer3Actor = JSONArray()
+        val layer4Object = JSONObject()
+        val layer4Actor = JSONArray()
+        var layer0 = layerViewList[0]
+        for (actor in layer0.actorViewList) {
+            val obj0 = JSONObject()
+            obj0.put("resource", actor.getData().bitmap.toString())
+            obj0.put("positionX", actor.getData().x)
+            obj0.put("positionY", actor.getData().y)
+            obj0.put("size", actor.getData().size)
+            jsonArray.put(obj0)
+        }
+        jsonObject.put("id", 0)
+        jsonObject.put("name", "layer0")
+        jsonObject.put("actor", jsonArray)
+        sceneObject.put("layer0", jsonObject)
+
+        var layer1 = layerViewList[1]
+        for (actor in layer1.actorViewList) {
+            val actorInLayer1 = JSONObject()
+            actorInLayer1.put("resource", actor.getData().bitmap.toString())
+            actorInLayer1.put("positionX", actor.getData().x)
+            actorInLayer1.put("positionY", actor.getData().y)
+            actorInLayer1.put("size", actor.getData().size)
+            layer1Actor.put(actorInLayer1)
+        }
+        layer1Object.put("id", 1)
+        layer1Object.put("name", "layer1")
+        layer1Object.put("actor", layer1Actor)
+        sceneObject.put("layer1", layer1Object)
+
+        var layer2 = layerViewList[2]
+        for (actor in layer2.actorViewList) {
+            val obj0 = JSONObject()
+            obj0.put("resource", actor.getData().bitmap.toString())
+            obj0.put("positionX", actor.getData().x)
+            obj0.put("positionY", actor.getData().y)
+            obj0.put("size", actor.getData().size)
+            layer2Actor.put(obj0)
+        }
+        layer2Object.put("id", 2)
+        layer2Object.put("name", "layer2")
+        layer2Object.put("actor", layer2Actor)
+        sceneObject.put("layer2", layer2Object)
+
+        var layer3 = layerViewList[3]
+        for (actor in layer3.actorViewList) {
+            val obj0 = JSONObject()
+            obj0.put("resource", actor.getData().bitmap.toString())
+            obj0.put("positionX", actor.getData().x)
+            obj0.put("positionY", actor.getData().y)
+            obj0.put("size", actor.getData().size)
+            layer3Actor.put(obj0)
+        }
+        layer3Object.put("id", 3)
+        layer3Object.put("name", "layer3")
+        layer3Object.put("actor", layer3Actor)
+        sceneObject.put("layer3", layer3Object)
+
+        var layer4 = layerViewList[4]
+        for (actor in layer4.actorViewList) {
+            val obj0 = JSONObject()
+            obj0.put("resource", actor.getData().bitmap.toString())
+            obj0.put("positionX", actor.getData().x)
+            obj0.put("positionY", actor.getData().y)
+            obj0.put("size", actor.getData().size)
+            layer4Actor.put(obj0)
+        }
+        layer4Object.put("id", 4)
+        layer4Object.put("name", "layer4")
+        layer4Object.put("actor", layer4Actor)
+        sceneObject.put("layer4", layer4Object)
+        Log.d("TEST12345666","YYYYYY = " + sceneView.getIsRecord())
+        sceneObject.put("isRecord", sceneView.getIsRecord())
+        sceneObject.put("record", sceneView.getRecord())
+        sceneObject.put("background", sceneView.getBackgroundTheme())
+        return sceneObject
+    }
+
+    private fun loadScene(sceneObject : JSONObject) : ArrayList<LayerView> {
+        var layerViewList = ArrayList<LayerView>()
+        var jsonText = sceneObject.toString()
+        var layerObject = JSONObject()
+        try {
+            val jsonObject1 = JSONObject(jsonText)
+            for (i in 0..4) {
+                when (i) {
+                    0 -> {
+                        layerObject = jsonObject1.getJSONObject("layer0")
+                        Log.d("TEST12345", "0000000")
+                    }
+                    1 -> {
+                        layerObject = jsonObject1.getJSONObject("layer1")
+                        Log.d("TEST12345", "11111")
+                    }
+                    2 -> {
+                        layerObject = jsonObject1.getJSONObject("layer2")
+                        Log.d("TEST12345", "2222")
+                    }
+                    3 -> {
+                        layerObject = jsonObject1.getJSONObject("layer3")
+                        Log.d("TEST12345", "333")
+                    }
+                    4 -> {
+                        layerObject = jsonObject1.getJSONObject("layer4")
+                        Log.d("TEST12345", "44444")
+                    }
+                }
+                val name = layerObject.getInt("id")
+                val title = layerObject.getString("name")
+                val array = layerObject.getJSONArray("actor")
+                Log.d("TEST12345", "name:$name, tittle:$title")
+                var actorViewList = ArrayList<ActorView>()
+                for (i in 0 until array.length()) {
+                    val jsonObject = array.getJSONObject(i)
+                    val bitmap = jsonObject.getString("resource")
+                    val x = jsonObject.getInt("positionX")
+                    val y = jsonObject.getInt("positionY")
+                    val size = jsonObject.getInt("size")
+                    var actorData = ActorData(drawableToBitmap(resources.getDrawable(R.drawable.ic_bird_g_1)),
+                            x, y, size)
+                    var actorView = ActorView(this, actorData)
+                    actorViewList.add(actorView)
+                }
+                layerViewList.add(initLayer(actorViewList))
+            }
+        } catch (e: JSONException) {
+            e.printStackTrace()
+        }
+        return layerViewList
+    }
+
+    private fun loadSceneIsRecord(sceneObject : JSONObject) : Boolean{
+        return sceneObject.getBoolean("isRecord")
+    }
+
+    private fun addScene(position: Int) : View.OnClickListener {
+        return View.OnClickListener {
+            var sceneView = SceneView(this, initLayerViewList(), resourceThemeBitmap[position],false)
+            sceneData.add(sceneToJSONObject(sceneView))
+            initControlSceneView()
+        }
+    }
+
+    private fun initThemeResource(){
+        resourceThemeBitmap.add(R.drawable.hill)
+        resourceThemeBitmap.add(R.drawable.sky)
+        resourceThemeBitmap.add(R.drawable.green)
+    }
+
+    private fun initActorResource(){
+        var actorList = ArrayList<Int>()
+        actorList.add(R.drawable.ic_bird_g_1)
+        actorList.add(R.drawable.ic_bird_g_1)
+        actorList.add(R.drawable.ic_bird_g_1)
+        actorList.add(R.drawable.ic_bird_g_1)
+        actorList.add(R.drawable.ic_bird_g_1)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+        resourceActorBitmap.add(actorList)
+    }
+
+    private fun preView() {
+        currentSceneView.setPlayViewGone()
+        var bomoLayer1 = currentSceneView.getLayerView()[4]
+        var bomoLayer2 = currentSceneView.getLayerView()[3]
+        var bomoLayer3 = currentSceneView.getLayerView()[2]
+        var bomoLayer4 = currentSceneView.getLayerView()[1]
+        var bomo_background = currentSceneView.getLayerView()[0]
+        var recordObject = currentSceneView.getRecord()
+        for (i in 0 until recordObject.length()) {
+            val array = recordObject.getJSONObject(i.toString()).getJSONArray("record")
+            for (i in 0 until array.length()) {
+                val handler = Handler()
+                val jsonObject = array.getJSONObject(i)
+                var playTime = jsonObject.getLong("time")
+                var x = jsonObject.getInt("positionX")
+                handler.postDelayed(Runnable {
+                    bomoLayer1.layout(x, bomoLayer1.y.toInt(), x + bomoLayer1.width, bomoLayer1.height + bomoLayer1.y.toInt())
+                    bomoLayer2.layout(x / 2, bomoLayer2.y.toInt(), x / 2 + bomoLayer2.width, bomoLayer2.height + bomoLayer2.y.toInt())
+                    bomoLayer3.layout(x / 4, bomoLayer3.y.toInt(), x / 4 + bomoLayer3.width, bomoLayer3.height + bomoLayer3.y.toInt())
+                    bomoLayer4.layout(x / 8, bomoLayer4.y.toInt(), x / 8 + bomoLayer4.width, bomoLayer4.height + bomoLayer4.y.toInt())
+                    bomo_background.layout(x / 32, bomo_background.y.toInt(), x / 32 + bomo_background.width, bomo_background.height + bomo_background.y.toInt())
+                }, playTime)
+            }
+        }
+        var handler = Handler( )
+        handler.postDelayed(Runnable {
+            currentSceneView.setPlayViewVis()
+        }, currentSceneView.endRecordTime - currentSceneView.startRecordTime)
+    }
+}

+ 113 - 0
src/main/java/com/bomostory/sceneeditmodule/SceneView.kt

@@ -0,0 +1,113 @@
+package com.example.tfat.myapplication
+
+import android.content.Context
+import android.view.LayoutInflater
+import android.view.View
+import android.widget.FrameLayout
+import android.widget.ImageView
+import android.widget.RelativeLayout
+import org.json.JSONObject
+
+class SceneView : FrameLayout{
+    private var layerViewList = ArrayList<LayerView>()
+    private var backgroundTheme = 0
+    private var isRecorded = false
+    private var record = JSONObject()
+    private var playIcon : ImageView
+    private var playView : View
+    var startRecordTime = 0L
+    var endRecordTime = 0L
+    var onTouchBoMoSceneListener : OnTouchBomoSceneListener
+
+    constructor(context:Context, layerViewList : ArrayList<LayerView>, resource : Int, isRecord: Boolean) : super(context) {
+        val inflater = LayoutInflater.from(context)
+        playView = inflater.inflate(R.layout.scene_view, null)
+        playIcon = playView.findViewById(R.id.play)
+        this.addView(playView)
+        for(layerView in layerViewList){
+            if (layerView == layerViewList.first()) {
+                layerView.setBackgroundResource(resource)
+            }
+            this.addView(layerView)
+        }
+        onTouchBoMoSceneListener = OnTouchBomoSceneListener()
+        onTouchBoMoSceneListener.setLayout(layerViewList)
+        this.backgroundTheme = resource
+        this.layerViewList = layerViewList
+        this.isRecorded = isRecord
+        this.setOnTouchListener(onTouchBoMoSceneListener)
+        if (isRecord) {
+            playView.bringToFront()
+        }
+    }
+
+    fun getLayerView() : ArrayList<LayerView>{
+        return layerViewList
+    }
+
+    fun setMode(isRecord : Boolean) {
+        onTouchBoMoSceneListener.setMode(isRecord)
+    }
+
+    fun getAllActor() : ArrayList<ActorView> {
+        var actorViewList = ArrayList<ActorView>()
+        for(layer in layerViewList) {
+            for(actorView in layer.actorViewList){
+                actorViewList.add(actorView)
+            }
+        }
+        return actorViewList
+    }
+
+    fun getActor(layerNum : Int) : ArrayList<ActorView> {
+        var actorViewList = ArrayList<ActorView>()
+        for(actorView in layerViewList[layerNum].actorViewList){
+            actorViewList.add(actorView)
+        }
+        return actorViewList
+    }
+
+    fun getBackgroundTheme() : Int{
+        return backgroundTheme
+    }
+
+    fun getRecord() : JSONObject {
+        return record
+    }
+
+    fun startRecordTime(time : Long) {
+        startRecordTime = time
+        onTouchBoMoSceneListener.startRecordTime(time)
+    }
+
+    fun endRecordTime(time : Long) {
+        endRecordTime = time
+        onTouchBoMoSceneListener.endRecordTime(time)
+    }
+
+    fun saveRecord(){
+        isRecorded = true
+        record = onTouchBoMoSceneListener.getRecord()
+        playView.bringToFront()
+    }
+
+    fun getIsRecord() : Boolean {
+        return isRecorded
+    }
+
+    fun setonClickPlayListener(onClickListener: OnClickListener){
+        if (isRecorded) playIcon.setOnClickListener(onClickListener)
+    }
+
+    fun setRecord(record : JSONObject){
+        this.record = record
+    }
+
+    fun setPlayViewGone(){
+        playView.visibility = View.INVISIBLE
+    }
+
+    fun setPlayViewVis(){
+        playView.visibility = View.VISIBLE
+    }
+}

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

@@ -0,0 +1,123 @@
+package com.example.tfat.myapplication.controlbar
+
+import android.content.Context
+import android.util.AttributeSet
+import android.widget.LinearLayout
+import android.view.LayoutInflater
+import android.widget.ImageButton
+import com.example.tfat.myapplication.R
+
+class ControlBarView : LinearLayout {
+
+    private lateinit var scene : ImageButton
+    private lateinit var layer1 : ImageButton
+    private lateinit var layer2 : ImageButton
+    private lateinit var layer3 : ImageButton
+    private lateinit var layer4 : ImageButton
+    private lateinit var layerBackground : ImageButton
+
+    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)
+        var rootView = inflater.inflate(R.layout.control_bar_view, this, true)
+        scene = rootView.findViewById(R.id.scene_btn)
+        layer1 = rootView.findViewById(R.id.layer_1)
+        layer2 = rootView.findViewById(R.id.layer_2)
+        layer3 = rootView.findViewById(R.id.layer_3)
+        layer4 = rootView.findViewById(R.id.layer_4)
+        layerBackground = rootView.findViewById(R.id.layer_background)
+    }
+
+    fun setBtnSelected(layer : Int) {
+        when (layer) {
+            0 -> {
+                layerBackground.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                layer4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer1.setBackgroundResource(R.drawable.layer_icon_background)
+                scene.setBackgroundResource(R.drawable.layer_icon_background)
+            }
+            1 -> {
+                layerBackground.setBackgroundResource(R.drawable.layer_icon_background)
+                layer4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer1.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                scene.setBackgroundResource(R.drawable.layer_icon_background)
+            }
+            2 -> {
+                layerBackground.setBackgroundResource(R.drawable.layer_icon_background)
+                layer4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer2.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                layer1.setBackgroundResource(R.drawable.layer_icon_background)
+                scene.setBackgroundResource(R.drawable.layer_icon_background)
+            }
+            3 -> {
+                layerBackground.setBackgroundResource(R.drawable.layer_icon_background)
+                layer4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer3.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                layer2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer1.setBackgroundResource(R.drawable.layer_icon_background)
+                scene.setBackgroundResource(R.drawable.layer_icon_background)
+            }
+            4 -> {
+                layerBackground.setBackgroundResource(R.drawable.layer_icon_background)
+                layer4.setBackgroundResource(R.drawable.layer_icon_selected_background)
+                layer3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer1.setBackgroundResource(R.drawable.layer_icon_background)
+                scene.setBackgroundResource(R.drawable.layer_icon_background)
+            }
+            5 -> {
+                layerBackground.setBackgroundResource(R.drawable.layer_icon_background)
+                layer4.setBackgroundResource(R.drawable.layer_icon_background)
+                layer3.setBackgroundResource(R.drawable.layer_icon_background)
+                layer2.setBackgroundResource(R.drawable.layer_icon_background)
+                layer1.setBackgroundResource(R.drawable.layer_icon_background)
+                scene.setBackgroundResource(R.drawable.layer_icon_selected_background)
+            }
+        }
+    }
+
+    fun initState() {
+        layerBackground.setBackgroundResource(R.drawable.layer_icon_background)
+        layer4.setBackgroundResource(R.drawable.layer_icon_background)
+        layer3.setBackgroundResource(R.drawable.layer_icon_background)
+        layer2.setBackgroundResource(R.drawable.layer_icon_background)
+        layer1.setBackgroundResource(R.drawable.layer_icon_background)
+        scene.setBackgroundResource(R.drawable.layer_icon_selected_background)
+    }
+
+    fun setonClickLayerSceneBtn(onClickListener: OnClickListener) {
+        scene.setOnClickListener(onClickListener)
+    }
+
+    fun setonClickLayer1Btn(onClickListener: OnClickListener) {
+        layer1.setOnClickListener(onClickListener)
+    }
+    fun setonClickLayer2Btn(onClickListener: OnClickListener) {
+        layer2.setOnClickListener(onClickListener)
+    }
+    fun setonClickLayer3Btn(onClickListener: OnClickListener) {
+        layer3.setOnClickListener(onClickListener)
+    }
+    fun setonClickLayer4Btn(onClickListener: OnClickListener) {
+        layer4.setOnClickListener(onClickListener)
+    }
+    fun setonClickLayerBackgroundBtn(onClickListener: OnClickListener) {
+        layerBackground.setOnClickListener(onClickListener)
+    }
+}

+ 14 - 0
src/main/java/com/bomostory/sceneeditmodule/controlbar/ControlBarViewModel.kt

@@ -0,0 +1,14 @@
+package com.example.tfat.myapplication.controlbar
+
+class ControlBarViewModel {
+
+//    fun test(sceneView: SceneView) {
+//        sceneView.setMode(1)
+//        sceneView.setOnTouchListener(sceneView.onTouchBomoSceneListener)
+//        for(actorView in sceneView.getAllActor()) actorView.setOnTouchListener(null)
+//        var adapter = actor_recycler_view.adapter as ActorAdapter
+//        adapter.setTargetLayer(sceneView.getLayerView()[1])
+//        actor_recycler_view.visibility = View.INVISIBLE
+//        bar.setBackgroundColor(Color.GREEN)
+//    }
+}

+ 60 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/NavigationBarView.kt

@@ -0,0 +1,60 @@
+package com.example.tfat.myapplication.navigationbar
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.widget.ImageButton
+import android.widget.RelativeLayout
+import com.example.tfat.myapplication.R
+
+class NavigationBarView : RelativeLayout{
+    private lateinit var scene : RelativeLayout
+    private lateinit var actor : RelativeLayout
+    private lateinit var brush : RelativeLayout
+    private lateinit var dialogue : RelativeLayout
+    private lateinit var image : ImageButton
+    private lateinit var settings : ImageButton
+
+    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)
+        var rootView = inflater.inflate(R.layout.navigation_bar_view, this, true)
+        scene = rootView.findViewById(R.id.scene)
+        actor = rootView.findViewById(R.id.actor)
+        brush = rootView.findViewById(R.id.brush)
+        dialogue = rootView.findViewById(R.id.dialogue)
+//        scene = rootView.scene_btn
+//        actor = rootView.actor_btn
+//        brush = rootView.brush_btn
+//        dialogue = rootView.dialogue_btn
+//        image = rootView.image_btn
+//        settings = rootView.settings
+    }
+
+    fun setonClickSceneBtn(onClickListener: OnClickListener) {
+        scene.setOnClickListener(onClickListener)
+    }
+
+    fun setonClickActorBtn(onClickListener: OnClickListener) {
+        actor.setOnClickListener(onClickListener)
+    }
+
+    fun setonClickBrushBtn(onClickListener: OnClickListener) {
+        brush.setOnClickListener(onClickListener)
+    }
+
+    fun setonClickDialogueBtn(onClickListener: OnClickListener) {
+        dialogue.setOnClickListener(onClickListener)
+    }
+}

+ 128 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/actor/ActorAdapter.kt

@@ -0,0 +1,128 @@
+package com.example.tfat.myapplication.navigationbar.actor
+
+import android.content.ClipData
+import android.content.ClipDescription
+import android.content.Context
+import android.graphics.Bitmap
+import android.support.v7.widget.RecyclerView
+import android.util.Log
+import android.view.*
+import android.widget.ImageView
+import android.widget.LinearLayout
+import com.example.tfat.myapplication.ActorData
+import com.example.tfat.myapplication.ActorView
+import com.example.tfat.myapplication.LayerView
+import com.example.tfat.myapplication.R
+import kotlin.collections.ArrayList
+
+class ActorAdapter(var context : Context, var data: ArrayList<ArrayList<Bitmap>>, var layout: LayerView) : RecyclerView.Adapter<ActorAdapter.ViewHolder>() {
+    private var tarLayout : LayerView? = null
+    private var bitmapData : ArrayList<Bitmap>
+    private lateinit var layerViewList : ArrayList<LayerView>
+
+    init {
+        tarLayout = layout
+        bitmapData = initActorData(data)
+        tarLayout?.setOnDragListener(dragListener(bitmapData))
+
+    }
+    override fun getItemCount(): Int {
+        return bitmapData.size
+    }
+
+    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
+        holder.bind(bitmapData?.get(position), position, initActorImageView(data)[position])
+    }
+
+    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
+        val v1 = LayoutInflater.from(parent.context).inflate(R.layout.item_actor, parent, false)
+        return ViewHolder(v1)
+    }
+
+    private fun dragListener(bitmaps : ArrayList<Bitmap>) : View.OnDragListener {
+        return View.OnDragListener {v, event ->
+            when (event.action) {
+                DragEvent.ACTION_DRAG_STARTED -> {
+                    return@OnDragListener true
+                }
+                DragEvent.ACTION_DROP -> {
+                    Log.d("TEST12345","QQQQ")
+                    var actorData = ActorData(bitmaps[(event.clipData.getItemAt(0).text.toString().toInt())],
+                            event.x.toInt() - 100, event.y.toInt() - 100, 200)
+                    var actorView = ActorView(context, actorData)
+                    var tempTarget = tarLayout
+                    if(event.clipData.getItemAt(0).text.toString().toInt() == 4){
+                        var r = (Math.random()*5)
+                        tarLayout = layerViewList[r.toInt()]
+                    }
+                    tarLayout?.actorViewList?.add(actorView)
+                    tarLayout?.addView(actorView)
+                    tarLayout = tempTarget
+                    return@OnDragListener true
+                }
+            }
+            return@OnDragListener true
+        }
+    }
+
+    fun setTargetLayer(layout: LayerView){
+        tarLayout = layout
+        tarLayout?.setOnDragListener(dragListener(bitmapData))
+    }
+
+    fun setLayer(layoutList : ArrayList<LayerView>){
+        layerViewList = layoutList
+    }
+
+    private fun initActorData(data: ArrayList<ArrayList<Bitmap>>) : ArrayList<Bitmap>{
+        var bitmaps = ArrayList<Bitmap>()
+        for(i in 0 until data.size){
+            bitmaps.add(data[i][0])
+        }
+        return bitmaps
+    }
+
+    private fun initActorImageView(data: ArrayList<ArrayList<Bitmap>>) : ArrayList<ArrayList<ImageView>>{
+        var imageViewList = ArrayList<ImageView>()
+        var actorImageViewList = ArrayList<ArrayList<ImageView>>()
+        for(i in 0 until data.size){
+            for(j in 0 until data[i].size){
+                var imageView = ImageView(context)
+                imageView.setImageBitmap(data[i][j])
+                imageViewList.add(imageView)
+            }
+            actorImageViewList.add(imageViewList)
+            imageViewList = ArrayList()
+        }
+        return actorImageViewList
+    }
+
+    class ViewHolder (view : View) : RecyclerView.ViewHolder(view) {
+        fun bind(bitmap: Bitmap?, position: Int, data: ArrayList<ImageView>) {
+            itemView.findViewById<ImageView>(R.id.actor_image).setImageBitmap(bitmap)
+            itemView.findViewById<ImageView>(R.id.actor_image).setOnTouchListener(boMoOnTouchListener(position))
+            itemView.findViewById<LinearLayout>(R.id.actor_rotate).removeAllViews()
+            for (i in 0 until data.size) {
+                itemView.findViewById<LinearLayout>(R.id.actor_rotate).addView(data[i])
+                var lParams = data[i].layoutParams
+                lParams.height = 100
+                lParams.width = 100
+                data[i].layoutParams = lParams
+            }
+        }
+        private fun boMoOnTouchListener(position: Int) : View.OnTouchListener {
+            return View.OnTouchListener {view, motionEvent ->
+                when (motionEvent.action) {
+                    MotionEvent.ACTION_DOWN -> {
+                        val item = ClipData.Item(position.toString())
+                        val mimeTypes = arrayOf(ClipDescription.MIMETYPE_TEXT_PLAIN)
+                        val dragData = ClipData(null, mimeTypes, item)
+                        val shadow = View.DragShadowBuilder(itemView.findViewById<ImageView>(R.id.actor_image))
+                        itemView.findViewById<ImageView>(R.id.actor_image).startDrag(dragData, shadow, null, View.DRAG_FLAG_GLOBAL)
+                    }
+                }
+                return@OnTouchListener true
+            }
+        }
+    }
+}

+ 28 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/actor/SelectActorView.kt

@@ -0,0 +1,28 @@
+package com.bomostory.sceneeditmodule.navigationbar.actor
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.widget.LinearLayout
+import com.example.tfat.myapplication.R
+
+class SelectActorView : 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 fun initView(){
+        val inflater = LayoutInflater.from(context)
+        var rootView = inflater.inflate(R.layout.actor_select_view, this, true)
+
+    }
+}

+ 34 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/scene/AddSceneAdapter.kt

@@ -0,0 +1,34 @@
+package com.example.tfat.myapplication.navigationbar.scene
+
+import android.content.Context
+import android.graphics.Bitmap
+import android.support.v7.widget.RecyclerView
+import android.view.*
+import android.widget.ImageView
+import com.example.tfat.myapplication.R
+import kotlin.collections.ArrayList
+
+class AddSceneAdapter(var context : Context, var data: ArrayList<Bitmap>, onClickListenerList: ArrayList<View.OnClickListener>) : RecyclerView.Adapter<AddSceneAdapter.ViewHolder>() {
+    private var bitmapData = data
+    private var onClickListenerList = onClickListenerList
+
+    override fun getItemCount(): Int {
+        return bitmapData.size
+    }
+
+    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
+        holder.bind(bitmapData?.get(position), position, onClickListenerList)
+    }
+
+    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
+        val v1 = LayoutInflater.from(parent.context).inflate(R.layout.item_add_scene, parent, false)
+        return ViewHolder(v1)
+    }
+
+    class ViewHolder (view : View) : RecyclerView.ViewHolder(view) {
+        fun bind(bitmap: Bitmap?, position : Int, onClickListenerList: ArrayList<View.OnClickListener>) {
+            itemView.findViewById<ImageView>(R.id.new_scene_image).setImageBitmap(bitmap)
+            itemView.findViewById<ImageView>(R.id.new_scene_image).setOnClickListener(onClickListenerList[position])
+        }
+    }
+}

+ 18 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/scene/AddSceneView.kt

@@ -0,0 +1,18 @@
+package com.example.tfat.myapplication.navigationbar.scene
+
+import android.content.Context
+import android.view.LayoutInflater
+import android.widget.RelativeLayout
+import com.example.tfat.myapplication.R
+
+class AddSceneView : RelativeLayout {
+
+    constructor(context: Context) : super(context) {
+        initView()
+    }
+
+    private fun initView() {
+        val inflater = LayoutInflater.from(context)
+        var rootView = inflater.inflate(R.layout.add_scene_view, this, true)
+    }
+}

+ 39 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/scene/ControlSceneView.kt

@@ -0,0 +1,39 @@
+package com.example.tfat.myapplication.navigationbar.scene
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.widget.RelativeLayout
+import com.example.tfat.myapplication.R
+
+class ControlSceneView : RelativeLayout{
+    private lateinit var addScene : RelativeLayout
+    private lateinit var duplicate : 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)
+        var rootView = inflater.inflate(R.layout.scene_control_view, this, true)
+        addScene = rootView.findViewById(R.id.add)
+        duplicate = rootView.findViewById(R.id.duplicate)
+    }
+
+    fun setonClickAddBtn(onClickListener: OnClickListener) {
+        addScene.setOnClickListener(onClickListener)
+    }
+
+    fun setonClickDuplicateBtn(onClickListener: OnClickListener) {
+        duplicate.setOnClickListener(onClickListener)
+    }
+}

+ 52 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/scene/SceneAdapter.kt

@@ -0,0 +1,52 @@
+package com.example.tfat.myapplication.navigationbar.scene
+
+import android.content.Context
+import android.graphics.Bitmap
+import android.support.v7.widget.RecyclerView
+import android.view.*
+import android.widget.ImageView
+import android.widget.TextView
+import com.example.tfat.myapplication.R
+import kotlin.collections.ArrayList
+
+class SceneAdapter(var context : Context, var data: ArrayList<Bitmap>, onClickListenerList: ArrayList<View.OnClickListener>, sceneIndex : Int) : RecyclerView.Adapter<SceneAdapter.ViewHolder>() {
+    private var onClickListenerList = onClickListenerList
+    private var sceneIndex = sceneIndex
+
+    override fun getItemCount(): Int {
+        return data.size
+    }
+
+    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
+        holder.bind(data?.get(position), position, onClickListenerList, sceneIndex)
+    }
+
+    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
+        val v1 = LayoutInflater.from(parent.context).inflate(R.layout.item_scene, parent, false)
+        return ViewHolder(v1)
+    }
+
+    class ViewHolder (view : View) : RecyclerView.ViewHolder(view) {
+        fun bind(bitmap: Bitmap?, position : Int, onClickListenerList: ArrayList<View.OnClickListener>, sceneIndex: Int) {
+            itemView.findViewById<ImageView>(R.id.scene_image).setImageBitmap(bitmap)
+            itemView.findViewById<ImageView>(R.id.scene_image).setOnClickListener(onClickListenerList[position])
+            itemView.findViewById<TextView>(R.id.scene_number).text = position.toString()
+            if (sceneIndex == position) {
+                itemView.findViewById<ImageView>(R.id.edit_view).visibility = View.VISIBLE
+            } else {
+                itemView.findViewById<ImageView>(R.id.edit_view).visibility = View.INVISIBLE
+            }
+        }
+    }
+
+    fun updateCurrentScene(index : Int) {
+        sceneIndex = index
+        this.notifyDataSetChanged()
+    }
+
+    fun update(data : ArrayList<Bitmap>, onClickListenerList: ArrayList<View.OnClickListener>) {
+        this.data = data
+        this.onClickListenerList = onClickListenerList
+        this.notifyDataSetChanged()
+    }
+}

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


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


+ 10 - 0
src/main/res/drawable/ic_actor.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="M20.5,6c-2.61,0.7 -5.67,1 -8.5,1s-5.89,-0.3 -8.5,-1L3,8c1.86,0.5 4,0.83 6,1v13h2v-6h2v6h2V9c2,-0.17 4.14,-0.5 6,-1l-0.5,-2zM12,6c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2z"
+      android:fillColor="#FFECB3"
+      android:fillType="nonZero"/>
+</vector>

+ 10 - 0
src/main/res/drawable/ic_add_w.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="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+</vector>

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


+ 16 - 0
src/main/res/drawable/ic_brush.xml

@@ -0,0 +1,16 @@
+<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="M8,17c0,-0.55 -0.45,-1 -1,-1s-1,0.45 -1,1c0,0.74 -0.19,1.4 -0.5,1.95 0.17,0.03 0.33,0.05 0.5,0.05 1.1,0 2,-0.9 2,-2z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFECB3"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M11.75,15l8.96,-8.96a0.996,0.996 0,0 0,0 -1.41l-1.34,-1.34c-0.2,-0.2 -0.45,-0.29 -0.7,-0.29 -0.25,0 -0.51,0.1 -0.71,0.29L9,12.25 11.75,15zM6,21c-1.51,0 -3.08,-0.78 -4,-2 0.84,0 2,-0.69 2,-2 0,-1.66 1.34,-3 3,-3s3,1.34 3,3c0,2.21 -1.79,4 -4,4zM6,17c0,0.74 -0.19,1.4 -0.5,1.95 0.17,0.03 0.33,0.05 0.5,0.05 1.1,0 2,-0.9 2,-2 0,-0.55 -0.45,-1 -1,-1s-1,0.45 -1,1z"
+      android:fillColor="#FFECB3"
+      android:fillType="nonZero"/>
+</vector>

+ 11 - 0
src/main/res/drawable/ic_btn_layercomp_01.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="0.6" android:fillColor="#212121"
+        android:fillType="evenOdd"
+        android:pathData="M0,24C0,12.954 8.958,4 20.009,4H48v40H20.009C8.959,44 0,35.048 0,24z" android:strokeAlpha="0.6"/>
+    <path android:fillAlpha="0.3" android:fillColor="#FFF"
+        android:fillType="nonZero"
+        android:pathData="M20.26,21L26,25.47 31.74,21 26,16.53z" android:strokeAlpha="0.3"/>
+    <path android:fillColor="#FFF" android:fillType="nonZero" android:pathData="M33.37,24.8l-7.38,5.74 -7.37,-5.73L17,26.07l9,7 9,-7z"/>
+    <path android:fillColor="#FFF" 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"/>
+</vector>

+ 14 - 0
src/main/res/drawable/ic_btn_layercomp_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.954 8.958,4 20.009,4H48v40H20.009C8.959,44 0,35.048 0,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"/>
+    <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"/>
+    <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"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="56"
+    android:viewportWidth="56" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FFF" android:fillType="evenOdd" android:pathData="M28,28m-28,0a28,28 0,1 1,56 0a28,28 0,1 1,-56 0"/>
+    <path android:fillColor="#FF6565" android:fillType="evenOdd" android:pathData="M28,28m-9,0a9,9 0,1 1,18 0a9,9 0,1 1,-18 0"/>
+</vector>

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

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="56"
+    android:viewportWidth="56" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF6565" android:fillType="evenOdd" android:pathData="M28,28m-28,0a28,28 0,1 1,56 0a28,28 0,1 1,-56 0"/>
+    <path android:fillColor="#FFF" android:fillType="evenOdd" android:pathData="M22,20L34,20A2,2 0,0 1,36 22L36,34A2,2 0,0 1,34 36L22,36A2,2 0,0 1,20 34L20,22A2,2 0,0 1,22 20z"/>
+</vector>

+ 16 - 0
src/main/res/drawable/ic_dialogue.xml

@@ -0,0 +1,16 @@
+<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="M20,4H4v13.17L5.17,16H20z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFECB3"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M20,18c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14zM4,17.17L4,4h16v12L5.17,16L4,17.17zM6,12h8v2L6,14v-2zM6,9h12v2L6,11L6,9zM6,6h12v2L6,8L6,6z"
+      android:fillColor="#FFECB3"
+      android:fillType="nonZero"/>
+</vector>

+ 20 - 0
src/main/res/drawable/ic_duplicate_w.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="M14,7H8v14h11v-9h-5z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M16,1H4c-1.1,0 -2,0.9 -2,2v14h2V3h12V1z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+  <path
+      android:pathData="M15,5L8,5c-1.1,0 -1.99,0.9 -1.99,2L6,21c0,1.1 0.89,2 1.99,2L19,23c1.1,0 2,-0.9 2,-2L21,11l-6,-6zM19,21L8,21L8,7h6v5h5v9z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+</vector>

+ 16 - 0
src/main/res/drawable/ic_edit_w.xml

@@ -0,0 +1,16 @@
+<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,18.08V19h0.92l9.06,-9.06 -0.92,-0.92z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M20.71,7.04a0.996,0.996 0,0 0,0 -1.41l-2.34,-2.34c-0.2,-0.2 -0.45,-0.29 -0.71,-0.29 -0.26,0 -0.51,0.1 -0.7,0.29l-1.83,1.83 3.75,3.75 1.83,-1.83zM3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM5.92,19H5v-0.92l9.06,-9.06 0.92,0.92L5.92,19z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+</vector>

+ 20 - 0
src/main/res/drawable/ic_image.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="M19,5H5v14h14V5zM6,17l3,-3.86 2.14,2.58 3,-3.87L18,17H6z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFECB3"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M5,21h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2zM5,5h14v14H5V5z"
+      android:fillColor="#FFECB3"
+      android:fillType="nonZero"/>
+  <path
+      android:pathData="M11.14,15.72L9,13.14 6,17h12l-3.86,-5.14z"
+      android:fillColor="#FFECB3"
+      android:fillType="nonZero"/>
+</vector>

+ 169 - 0
src/main/res/drawable/ic_launcher_background.xml

@@ -0,0 +1,169 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportHeight="108"
+    android:viewportWidth="108">
+    <path
+        android:fillColor="#26A69A"
+        android:pathData="M0,0h108v108h-108z" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M9,0L9,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,0L19,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,0L29,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,0L39,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,0L49,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,0L59,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,0L69,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,0L79,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M89,0L89,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M99,0L99,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,9L108,9"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,19L108,19"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,29L108,29"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,39L108,39"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,49L108,49"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,59L108,59"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,69L108,69"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,79L108,79"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,89L108,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,99L108,99"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,29L89,29"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,39L89,39"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,49L89,49"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,59L89,59"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,69L89,69"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,79L89,79"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,19L29,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,19L39,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,19L49,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,19L59,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,19L69,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,19L79,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+</vector>

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


+ 20 - 0
src/main/res/drawable/ic_layer_1_w.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="M19,5L5,5v14h14L19,5zM14,17h-2L12,9h-2L10,7h4v10z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M5,21h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2zM5,5h14v14H5V5z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+  <path
+      android:pathData="M10,9h2v8h2V7h-4z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+</vector>

+ 20 - 0
src/main/res/drawable/ic_layer_2_w.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="M19,5L5,5v14h14L19,5zM15,11a2,2 0,0 1,-2 2h-2v2h4v2L9,17v-4a2,2 0,0 1,2 -2h2L13,9L9,9L9,7h4a2,2 0,0 1,2 2v2z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M5,21h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2zM5,5h14v14H5V5z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+  <path
+      android:pathData="M13,7H9v2h4v2h-2a2,2 0,0 0,-2 2v4h6v-2h-4v-2h2a2,2 0,0 0,2 -2V9a2,2 0,0 0,-2 -2z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+</vector>

+ 20 - 0
src/main/res/drawable/ic_layer_3_w.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="M5,19h14L19,5L5,5v14zM9,15h4v-2h-2v-2h2L13,9L9,9L9,7h4a2,2 0,0 1,2 2v1.5c0,0.83 -0.67,1.5 -1.5,1.5 0.83,0 1.5,0.67 1.5,1.5L15,15a2,2 0,0 1,-2 2L9,17v-2z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,19L5,19L5,5h14v14z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+  <path
+      android:pathData="M15,15v-1.5c0,-0.83 -0.67,-1.5 -1.5,-1.5 0.83,0 1.5,-0.67 1.5,-1.5V9a2,2 0,0 0,-2 -2H9v2h4v2h-2v2h2v2H9v2h4a2,2 0,0 0,2 -2z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+</vector>

+ 20 - 0
src/main/res/drawable/ic_layer_4_w.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="M5,19h14L19,5L5,5v14zM13,17h2L15,7h-2v4h-2L11,7L9,7v6h4v4z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,19L5,19L5,5h14v14z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+  <path
+      android:pathData="M13,17h2V7h-2v4h-2V7H9v6h4z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+</vector>

+ 16 - 0
src/main/res/drawable/ic_layer_bg_w.xml

@@ -0,0 +1,16 @@
+<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,16h3.04l-1.52,-2.03z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M9.78,11.63l1.25,1.67L14,9.33 19,16h-8.46l-4.01,-5.37L1,18h22L14,6l-4.22,5.63zM5,16l1.52,-2.03L8.04,16H5z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+</vector>

+ 20 - 0
src/main/res/drawable/ic_layer_w.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="#FFF"
+      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="#FFF"
+      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="#FFF"
+      android:fillType="nonZero"/>
+</vector>

+ 20 - 0
src/main/res/drawable/ic_play_circle_w.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="M12,20c4.41,0 8,-3.59 8,-8s-3.59,-8 -8,-8 -8,3.59 -8,8 3.59,8 8,8zM10,7.5l6,4.5 -6,4.5v-9z"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M12,22c5.52,0 10,-4.48 10,-10S17.52,2 12,2 2,6.48 2,12s4.48,10 10,10zM12,4c4.41,0 8,3.59 8,8s-3.59,8 -8,8 -8,-3.59 -8,-8 3.59,-8 8,-8z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+  <path
+      android:pathData="M10,7.5v9l6,-4.5z"
+      android:fillColor="#FFF"
+      android:fillType="nonZero"/>
+</vector>

+ 16 - 0
src/main/res/drawable/ic_scene.xml

@@ -0,0 +1,16 @@
+<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="M15.17,9.17m-5,0a5,5 0,1 1,10 0a5,5 0,1 1,-10 0"
+      android:strokeAlpha="0.3"
+      android:fillColor="#FFECB3"
+      android:fillType="nonZero"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M15.17,2.17c3.87,0 7,3.13 7,7A7,7 0,0 1,16 16.12L16,20h3v2L3,22v-5L2,17v-4c0,-0.55 0.45,-1 1,-1h3c0.55,0 1,0.45 1,1v4L6,17v3h8v-3.94a6.98,6.98 0,0 1,-5.83 -6.89c0,-3.87 3.13,-7 7,-7zM4.5,11a1.5,1.5 0,1 1,0 -3,1.5 1.5,0 0,1 0,3zM15.17,14.17c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5 -5,2.24 -5,5 2.24,5 5,5z"
+      android:fillColor="#FFECB3"
+      android:fillType="nonZero"/>
+</vector>

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


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

@@ -0,0 +1,10 @@
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+  <solid
+      android:color="#60212121"/>
+  <corners
+      android:topLeftRadius="28dp"
+      android:topRightRadius="0dp"
+      android:bottomRightRadius="0dp"
+      android:bottomLeftRadius="28dp"/>
+</shape>

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

@@ -0,0 +1,10 @@
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+  <solid
+      android:color="#e6ffffff"/>
+  <corners
+      android:topLeftRadius="28dp"
+      android:topRightRadius="0dp"
+      android:bottomRightRadius="0dp"
+      android:bottomLeftRadius="28dp"/>
+</shape>

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


+ 8 - 0
src/main/res/layout/activity_main.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".MainActivity">
+</android.support.constraint.ConstraintLayout>

+ 60 - 0
src/main/res/layout/activity_scene_edit.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:background="#212121"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent">
+    <ImageView
+        android:id="@+id/bar"
+        android:layout_alignParentTop="true"
+        android:layout_width="match_parent"
+        android:layout_height="128dp" />
+    <RelativeLayout
+        android:id="@+id/scene_edit_view"
+        android:layout_below="@+id/bar"
+        android:layout_width="1024dp"
+        android:layout_height="512dp"
+        android:background="#212121">
+    </RelativeLayout>
+    <RelativeLayout
+        android:id="@+id/view_container"
+        android:layout_above="@+id/navigation_bar"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+    </RelativeLayout>
+    <!--<com.example.tfat.myapplication.navigationbar.NavigationBarView-->
+        <!--android:id="@+id/navigation_bar"-->
+        <!--android:background="#80FFFFFF"-->
+        <!--android:layout_width="match_parent"-->
+        <!--android:layout_height="64dp"-->
+        <!--android:layout_alignParentBottom="true"/>-->
+    <RelativeLayout
+    android:id="@+id/navigation_bar"
+    android:background="#80FFFFFF"
+    android:layout_width="match_parent"
+    android:layout_height="64dp"
+    android:layout_alignParentBottom="true">
+    </RelativeLayout>
+    <RelativeLayout
+        android:id="@+id/space"
+        android:layout_width="48dp"
+        android:layout_height="200dp"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentRight="true">
+    </RelativeLayout>
+    <com.example.tfat.myapplication.controlbar.ControlBarView
+        android:id="@+id/control_bar_view"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/space"
+        android:layout_alignParentRight="true">
+    </com.example.tfat.myapplication.controlbar.ControlBarView>
+    <ImageView
+        android:id="@+id/start_record"
+        android:layout_width="56dp"
+        android:layout_height="56dp"
+        android:layout_marginBottom="36dp"
+        android:layout_alignParentBottom="true"
+        android:layout_centerHorizontal="true"
+        android:src="@drawable/ic_btn_record"/>
+</RelativeLayout>

+ 36 - 0
src/main/res/layout/actor_select_view.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="1024dp"
+    android:layout_height="200dp"
+    android:orientation="vertical"
+    android:layout_above="@+id/navigation_bar"
+    android:background="#212121">
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:paddingLeft="16dp">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentLeft="true"
+            android:layout_centerVertical="true"
+            android:textSize="14sp"
+            android:textColor="#ffecb3"
+            android:text="CHOOSE THEME"/>
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="20sp"
+            android:layout_centerHorizontal="true"
+            android:layout_centerVertical="true"
+            android:textColor="#ffffff"
+            android:text="THEME NAME"/>
+    </RelativeLayout>
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/select_actor_recycler_view"
+        android:paddingLeft="8dp"
+        android:layout_width="match_parent"
+        android:layout_height="160dp"
+        android:background="#f0ebe1">
+    </android.support.v7.widget.RecyclerView>
+</LinearLayout>

+ 37 - 0
src/main/res/layout/add_scene_view.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="136dp"
+    android:orientation="vertical"
+    android:layout_above="@+id/navigation_bar"
+    android:background="#212121">
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:paddingLeft="16dp">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentLeft="true"
+                android:layout_centerVertical="true"
+                android:textSize="14sp"
+                android:textColor="#ffecb3"
+                android:text="CHOOSE THEME"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="20sp"
+                android:layout_centerHorizontal="true"
+                android:layout_centerVertical="true"
+                android:textColor="#ffffff"
+                android:text="THEME NAME"/>
+        </RelativeLayout>
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/new_scene_recycler_view"
+            android:paddingLeft="8dp"
+            android:layout_width="match_parent"
+            android:layout_height="96dp"
+            android:background="#f0ebe1">
+        </android.support.v7.widget.RecyclerView>
+</LinearLayout>
+

+ 46 - 0
src/main/res/layout/control_bar_view.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/layer_button"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <ImageButton
+        android:id="@+id/scene_btn"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:scaleType="center"
+        android:src="@drawable/ic_layer_w"
+        android:background="@drawable/layer_icon_background"/>
+    <ImageButton
+        android:id="@+id/layer_background"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:src="@drawable/ic_layer_bg_w"
+        android:background="@drawable/layer_icon_background"/>
+    <ImageButton
+        android:id="@+id/layer_4"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:src="@drawable/ic_layer_4_w"
+        android:background="@drawable/layer_icon_background"/>
+    <ImageButton
+        android:id="@+id/layer_3"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:src="@drawable/ic_layer_3_w"
+        android:background="@drawable/layer_icon_background"/>
+    <ImageButton
+        android:id="@+id/layer_2"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:src="@drawable/ic_layer_2_w"
+        android:background="@drawable/layer_icon_background"/>
+    <ImageButton
+        android:id="@+id/layer_1"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:scaleType="center"
+        android:src="@drawable/ic_layer_1_w"
+        android:background="@drawable/layer_icon_background"/>
+</LinearLayout>

+ 27 - 0
src/main/res/layout/item_actor.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/actor"
+    android:layout_width="wrap_content"
+    android:layout_height="160dp"
+    android:orientation="horizontal">
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+        <ImageView
+            android:id="@+id/actor_image"
+            android:layout_gravity="center"
+            android:layout_width="96dp"
+            android:layout_height="96dp"/>
+        <LinearLayout
+            android:id="@+id/actor_rotate"
+            android:layout_width="wrap_content"
+            android:layout_height="60dp"
+            android:orientation="horizontal">
+        </LinearLayout>
+    </LinearLayout>
+    <ImageView
+        android:layout_width="1dp"
+        android:layout_height="match_parent"
+        android:background="#1f000000"/>
+</LinearLayout>

+ 8 - 0
src/main/res/layout/item_add_scene.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ImageView
+    android:id="@+id/new_scene_image"
+    android:layout_marginTop="12dp"
+    android:layout_width="144dp"
+    android:layout_height="72dp"
+    xmlns:android="http://schemas.android.com/apk/res/android" />
+

+ 35 - 0
src/main/res/layout/item_scene.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/actor"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+    <TextView
+        android:id="@+id/scene_number"
+        android:paddingLeft="8dp"
+        android:layout_marginBottom="8dp"
+        android:layout_marginTop="8dp"
+        android:textSize="14sp"
+        android:textColor="#ffffff"
+        android:layout_width="144dp"
+        android:layout_height="16dp"/>
+    <RelativeLayout
+        android:layout_width="144dp"
+        android:layout_height="72dp">
+        <ImageView
+            android:id="@+id/scene_image"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"/>
+        <ImageView
+            android:id="@+id/edit_view"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_marginRight="8dp"
+            android:scaleType="center"
+            android:layout_centerVertical="true"
+            android:layout_centerHorizontal="true"
+            android:src="@drawable/ic_edit_w"
+            android:background="#61000000"/>
+    </RelativeLayout>
+</LinearLayout>

+ 146 - 0
src/main/res/layout/navigation_bar_view.xml

@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/layer_button"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="#212121">
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true">
+        <RelativeLayout
+            android:id="@+id/scene"
+            android:layout_width="104dp"
+            android:layout_height="match_parent">
+            <ImageView
+                android:id="@+id/scene_btn"
+                android:layout_margin="7dp"
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:scaleType="center"
+                android:background="#212121"
+                android:layout_centerHorizontal="true"
+                android:src="@drawable/ic_scene"/>
+            <TextView
+                android:id="@+id/scene_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/scene_btn"
+                android:layout_centerInParent="true"
+                android:text="Scene"
+                android:textColor="#ffecb3"/>
+        </RelativeLayout>
+        <RelativeLayout
+            android:id="@+id/actor"
+            android:layout_width="104dp"
+            android:layout_height="match_parent"
+            android:layout_toRightOf="@id/scene">
+            <ImageView
+                android:id="@+id/actor_btn"
+                android:layout_margin="7dp"
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:scaleType="center"
+                android:background="#212121"
+                android:layout_centerHorizontal="true"
+                android:src="@drawable/ic_actor"/>
+            <TextView
+                android:id="@+id/actor_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/actor_btn"
+                android:layout_centerInParent="true"
+                android:text="Actor"
+                android:textColor="#ffecb3"/>
+        </RelativeLayout>
+        <RelativeLayout
+            android:id="@+id/brush"
+            android:layout_width="104dp"
+            android:layout_height="match_parent"
+            android:layout_toRightOf="@id/actor">
+            <ImageView
+                android:id="@+id/brush_btn"
+                android:layout_margin="7dp"
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:scaleType="center"
+                android:background="#212121"
+                android:layout_centerHorizontal="true"
+                android:src="@drawable/ic_brush"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/brush_btn"
+                android:layout_centerInParent="true"
+                android:text="Brush"
+                android:textColor="#ffecb3"/>
+        </RelativeLayout>
+        <RelativeLayout
+            android:id="@+id/dialogue"
+            android:layout_width="104dp"
+            android:layout_height="match_parent"
+            android:layout_toRightOf="@id/brush">
+            <Button
+                android:id="@+id/dialogue_btn"
+                android:layout_margin="7dp"
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:scaleType="center"
+                android:background="#212121"
+                android:layout_centerHorizontal="true"
+                android:drawableTop="@drawable/ic_dialogue"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/dialogue_btn"
+                android:layout_centerInParent="true"
+                android:text="Dialogue"
+                android:textColor="#ffecb3"/>
+        </RelativeLayout>
+        <RelativeLayout
+            android:id="@+id/image"
+            android:layout_width="104dp"
+            android:layout_height="match_parent"
+            android:layout_toRightOf="@id/dialogue">
+            <Button
+                android:id="@+id/image_btn"
+                android:layout_margin="7dp"
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:scaleType="center"
+                android:background="#212121"
+                android:layout_centerHorizontal="true"
+                android:drawableTop="@drawable/ic_image"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/image_btn"
+                android:layout_centerInParent="true"
+                android:text="Image"
+                android:textColor="#ffecb3"/>
+        </RelativeLayout>
+        <RelativeLayout
+            android:id="@+id/settings"
+            android:layout_width="104dp"
+            android:layout_height="match_parent"
+            android:layout_toRightOf="@id/image">
+            <Button
+                android:id="@+id/settings_btn"
+                android:layout_margin="7dp"
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:scaleType="center"
+                android:background="#212121"
+                android:layout_centerHorizontal="true"
+                android:drawableTop="@drawable/ic_settings"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/settings_btn"
+                android:layout_centerInParent="true"
+                android:text="Settings"
+                android:textColor="#ffecb3"/>
+        </RelativeLayout>
+    </RelativeLayout>
+</RelativeLayout>

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

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    android:layout_above="@+id/navigation_bar"
+    android:background="#60000000">
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/scene_recycler_view"
+            android:paddingLeft="32dp"
+            android:layout_width="800dp"
+            android:layout_height="120dp"
+            android:background="#60000000">
+        </android.support.v7.widget.RecyclerView>
+        <RelativeLayout
+            android:id="@+id/duplicate"
+            android:layout_width="112dp"
+            android:layout_height="120dp"
+            android:background="#60000000">
+            <ImageView
+                android:id="@+id/duplicate_btn"
+                android:layout_margin="7dp"
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:scaleType="center"
+                android:background="#60000000"
+                android:layout_centerVertical="true"
+                android:layout_centerHorizontal="true"
+                android:src="@drawable/ic_duplicate_w"/>
+            <TextView
+                android:id="@+id/actor_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/duplicate_btn"
+                android:layout_centerInParent="true"
+                android:text="Duplicate"
+                android:textColor="#ffffff"/>
+        </RelativeLayout>
+    <RelativeLayout
+        android:id="@+id/add"
+        android:layout_width="112dp"
+        android:layout_height="120dp"
+        android:background="#60000000">
+        <ImageView
+            android:id="@+id/add_btn"
+            android:layout_margin="7dp"
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:scaleType="center"
+            android:background="#60000000"
+            android:layout_centerVertical="true"
+            android:layout_centerHorizontal="true"
+            android:src="@drawable/ic_add_w"/>
+        <TextView
+            android:id="@+id/actor_text1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@+id/add_btn"
+            android:layout_centerInParent="true"
+            android:text="New"
+            android:textColor="#ffffff"/>
+    </RelativeLayout>
+</LinearLayout>
+

+ 21 - 0
src/main/res/layout/scene_view.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/play_view"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+    <RelativeLayout
+        android:layout_centerHorizontal="true"
+        android:layout_centerVertical="true"
+        android:background="#42000000"
+        android:layout_width="1024dp"
+        android:layout_height="512dp">
+        <ImageView
+            android:id="@+id/play"
+            android:src="@drawable/ic_play_circle_w"
+            android:layout_centerHorizontal="true"
+            android:layout_centerVertical="true"
+            android:layout_width="56dp"
+            android:layout_height="56dp" />
+    </RelativeLayout>
+</RelativeLayout>

+ 5 - 0
src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

+ 5 - 0
src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

BIN
src/main/res/mipmap-hdpi/ic_launcher.png


BIN
src/main/res/mipmap-hdpi/ic_launcher_round.png


BIN
src/main/res/mipmap-mdpi/ic_launcher.png


BIN
src/main/res/mipmap-mdpi/ic_launcher_round.png


BIN
src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
src/main/res/mipmap-xhdpi/ic_launcher_round.png


BIN
src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
src/main/res/mipmap-xxhdpi/ic_launcher_round.png


BIN
src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
src/main/res/mipmap-xxxhdpi/ic_launcher_round.png


+ 7 - 0
src/main/res/values/colors.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="colorPrimary">#3F51B5</color>
+    <color name="colorPrimaryDark">#303F9F</color>
+    <color name="colorAccent">#FF4081</color>
+    <color name="colorRed">#FF0000</color>
+</resources>

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

@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">My Application</string>
+</resources>

+ 11 - 0
src/main/res/values/styles.xml

@@ -0,0 +1,11 @@
+<resources>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+        <!-- Customize your theme here. -->
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+        <item name="colorAccent">@color/colorAccent</item>
+    </style>
+
+</resources>

+ 17 - 0
src/test/java/com/bomostory/sceneeditmodule/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package com.bomostory.sceneeditmodule;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() {
+        assertEquals(4, 2 + 2);
+    }
+}