Bläddra i källkod

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

liweihao 6 år sedan
förälder
incheckning
558afeacaf

+ 23 - 0
src/main/java/com/bomostory/sceneeditmodule/BrushDrawer.kt

@@ -0,0 +1,23 @@
+package com.bomostory.sceneeditmodule
+
+import android.graphics.*
+import com.bomostory.sceneeditmodule.basicdata.Brush
+
+object BrushDrawer {
+    fun drawScene(brush: Brush): Bitmap? {
+        var sceneBitmap: Bitmap? = null
+
+            val conf = Bitmap.Config.ARGB_8888
+            sceneBitmap = Bitmap.createBitmap(300, 300, conf)
+            sceneBitmap = Bitmap.createScaledBitmap(sceneBitmap, 300, 300, true)
+
+            val canvas = Canvas(sceneBitmap)
+            val textPaint = Paint()
+            textPaint.strokeWidth = 1f
+            textPaint.isAntiAlias = true
+            textPaint.color = Color.parseColor(brush.color)
+            textPaint.textSize = brush.brushSize.toFloat()
+            canvas.drawText("FUCK",0f,150f,textPaint)
+        return sceneBitmap
+    }
+}

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

@@ -22,16 +22,13 @@ import com.google.gson.Gson
 import kotlinx.android.synthetic.main.activity_scene_edit.*
 import com.bomostory.sceneeditmodule.basicdata.*
 import com.bomostory.sceneeditmodule.navigationbar.dialogue.DialogueView
-import com.bomostory.sceneeditmodule.screen.view.EditActorView
-import com.bomostory.sceneeditmodule.screen.view.OnTouchBoMoSceneListener
 import com.example.tfat.myapplication.navigationbar.actor.LayerManagementDialog
 import kotlinx.android.synthetic.main.control_actor_dialog.view.*
 import com.bomostory.sceneeditmodule.utils.FileUtils
-import com.bomostory.sceneeditmodule.screen.view.LayerView
 import android.util.DisplayMetrics
+import android.widget.RelativeLayout
 import com.bomostory.sceneeditmodule.EditTextDialog
 import com.bomostory.sceneeditmodule.screen.movie.MovieEditActivity
-import com.bomostory.sceneeditmodule.screen.view.OnTouchSceneListener
 import com.example.tfat.myapplication.navigationbar.EditSceneView
 import com.example.tfat.myapplication.navigationbar.RecordFinishView
 import io.reactivex.android.schedulers.AndroidSchedulers
@@ -41,8 +38,13 @@ import kotlinx.android.synthetic.main.popupview_opacity_dialog.view.*
 import kotlinx.android.synthetic.main.view_control_dialogue_dialog.view.*
 import java.util.concurrent.CopyOnWriteArrayList
 import android.widget.SeekBar
+import com.bomostory.sceneeditmodule.BrushDrawer
 import com.bomostory.sceneeditmodule.DialogueColorData
+import com.bomostory.sceneeditmodule.navigationbar.brush.BrushView
+import com.bomostory.sceneeditmodule.screen.view.*
 import kotlinx.android.synthetic.main.popupview_color_dialog.view.*
+import kotlinx.android.synthetic.main.scene_brush_view.view.*
+import kotlin.math.ln1p
 
 
 class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener, EditActorView.OnActorChangeListener,
@@ -72,6 +74,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
         const val ACTOR_INIT_POSITION_X = 200
         const val ACTOR_INIT_POSITION_Y = 200
         const val BACKGROUND_MOVE_RATE = 32
+        const val BRUSH_SIZE = 16
         val listeners = CopyOnWriteArrayList<Runnable>()
     }
 
@@ -186,7 +189,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
                         initActorRecyclerView()
                     })
                     navigationBarView.setonClickBrushBtn(View.OnClickListener {
-
+                        initBrushView()
                     })
                     navigationBarView.setonClickDialogueBtn(View.OnClickListener {
                         initDialogueView()
@@ -261,26 +264,61 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
         }
     }
 
-    private fun initDialogueView(){
-        if (viewContainer.getChildAt(0) is DialogueView) {
-            viewContainer.removeAllViews()
+    private fun initBrushView(){
+        if (navigationBar.getChildAt(0) is BrushView) {
+            navigationBar.removeAllViews()
+            startRecord.visibility = View.VISIBLE
             return
         }
-        var dialogueView = DialogueView(this)
-        switchLayer(0)
-        sceneEditView.findViewById<LayerView>(currentLayerIndex).setOnDragListener(dragListener())
-        viewContainer.addView(dialogueView)
-        dialogueView.layoutParams.width = monitorSize.widthPixels
+        startRecord.visibility = View.INVISIBLE
+        viewContainer.removeAllViews()
+        navigationBar.removeAllViews()
+        paint_view.layoutParams.width = monitorSize.widthPixels
+        paint_view.layoutParams.height = monitorSize.widthPixels.div(2)
+        paint_view.bringToFront()
+        paint_view.visibility = View.VISIBLE
+        var brushView = BrushView(this)
+        navigationBar.addView(brushView)
+        brushView.gravity = Gravity.CENTER_HORIZONTAL
+        brushView.layoutParams.width = monitorSize.widthPixels
+        brushView.setBrushSize(BRUSH_SIZE, object : SeekBar.OnSeekBarChangeListener{
+            override fun onProgressChanged(p0: SeekBar?, p1: Int, p2: Boolean) {
+                brushView.tv_brush_view_size.text = "Size: " + p1.toString() + "px"
+            }
+            override fun onStartTrackingTouch(p0: SeekBar?) {
+            }
+            override fun onStopTrackingTouch(p0: SeekBar?) {
+            }
+        })
+        brushView.setOnDoneClick(View.OnClickListener {
+            navigationBar.removeAllViews()
+            paint_view.visibility = View.INVISIBLE
+            startRecord.visibility = View.VISIBLE
+            initNavigationBarView()
+            var brush = Brush().apply {
+                brushSize = brushView.getBrushSize()
+            }
+            //FileUtils.saveBitmapForActor(this, BrushDrawer.drawScene(brush), System.currentTimeMillis().toString())
+//            project.story?.let {
+//                it.scenes?.let{
+//                    sceneEditView.scene = it[currentSceneIndex]
+//                }
+//            }
+        })
     }
 
     private fun initActorRecyclerView() {
         if (viewContainer.getChildAt(0) is SelectActorView) {
             viewContainer.removeAllViews()
+            startRecord.visibility = View.VISIBLE
             return
+        } else {
+            viewContainer.removeAllViews()
         }
+        startRecord.visibility = View.INVISIBLE
         if (currentLayerIndex == 6){
             switchLayer(0)
-            return
+            initActorRecyclerView()
         }
         var selectActorView = SelectActorView(this)
         val layoutManager = LinearLayoutManager(this)
@@ -292,6 +330,25 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
         viewContainer.addView(selectActorView)
         selectActorView.layoutParams.width = monitorSize.widthPixels
     }
+    private fun initDialogueView(){
+        if (viewContainer.getChildAt(0) is DialogueView) {
+            viewContainer.removeAllViews()
+            startRecord.visibility = View.VISIBLE
+            return
+        } else {
+            viewContainer.removeAllViews()
+        }
+        startRecord.visibility = View.INVISIBLE
+        if (currentLayerIndex == 6){
+            switchLayer(0)
+            initActorRecyclerView()
+        }
+        var dialogueView = DialogueView(this)
+        sceneEditView.findViewById<LayerView>(currentLayerIndex).setOnDragListener(dragListener())
+        viewContainer.addView(dialogueView)
+        dialogueView.layoutParams.width = monitorSize.widthPixels
+    }
+
 
     private fun initControlSceneView() {
         if (viewContainer.getChildAt(0) is ControlSceneView) {

+ 9 - 0
src/main/java/com/bomostory/sceneeditmodule/basicdata/Brush.kt

@@ -0,0 +1,9 @@
+package com.bomostory.sceneeditmodule.basicdata
+
+import android.graphics.Color
+
+class Brush {
+    var color: String? = "#ffffff"
+    var brushType: Int = 0
+    var brushSize: Int = 0
+}

+ 123 - 0
src/main/java/com/bomostory/sceneeditmodule/navigationbar/brush/BrushView.kt

@@ -0,0 +1,123 @@
+package com.bomostory.sceneeditmodule.navigationbar.brush
+
+import android.content.Context
+import android.support.v4.content.ContextCompat
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.widget.LinearLayout
+import android.widget.SeekBar
+import com.example.tfat.myapplication.R
+import kotlinx.android.synthetic.main.scene_brush_view.view.*
+
+class BrushView : 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() {
+        LayoutInflater.from(context).inflate(R.layout.scene_brush_view, this, true)
+        iv_brush_view_color1.setOnClickListener {
+            initColorState()
+            iv_brush_view_color1.background = ContextCompat.getDrawable(context, R.drawable.btn_edit_text_dialog_circle_selected)
+        }
+        iv_brush_view_color2.setOnClickListener {
+            initColorState()
+            iv_brush_view_color2.background = ContextCompat.getDrawable(context, R.drawable.btn_edit_text_dialog_circle_selected)
+        }
+        iv_brush_view_color3.setOnClickListener {
+            initColorState()
+            iv_brush_view_color3.background = ContextCompat.getDrawable(context, R.drawable.btn_edit_text_dialog_circle_selected)
+        }
+        iv_brush_view_color4.setOnClickListener {
+            initColorState()
+            iv_brush_view_color4.background = ContextCompat.getDrawable(context, R.drawable.btn_edit_text_dialog_circle_selected)
+        }
+        iv_brush_view_color5.setOnClickListener {
+            initColorState()
+            iv_brush_view_color5.background = ContextCompat.getDrawable(context, R.drawable.btn_edit_text_dialog_circle_selected)
+        }
+        iv_brush_view_color6.setOnClickListener {
+            initColorState()
+            iv_brush_view_color6.background = ContextCompat.getDrawable(context, R.drawable.btn_edit_text_dialog_circle_selected)
+        }
+        iv_brush_view_color7.setOnClickListener {
+            initColorState()
+            iv_brush_view_color7.background = ContextCompat.getDrawable(context, R.drawable.btn_edit_text_dialog_circle_selected)
+        }
+        iv_brush_view_color8.setOnClickListener {
+            initColorState()
+            iv_brush_view_color8.background = ContextCompat.getDrawable(context, R.drawable.btn_edit_text_dialog_circle_selected)
+        }
+        iv_brush_view_color9.setOnClickListener {
+            initColorState()
+            iv_brush_view_color9.background = ContextCompat.getDrawable(context, R.drawable.btn_edit_text_dialog_circle_selected)
+        }
+        iv_brush_view_color10.setOnClickListener {
+            initColorState()
+            iv_brush_view_color10.background = ContextCompat.getDrawable(context, R.drawable.btn_edit_text_dialog_circle_selected)
+        }
+        iv_brush_view_brush1.setOnClickListener {
+            initBrushState()
+            iv_brush_view_brush1.alpha = 1f
+        }
+        iv_brush_view_brush2.setOnClickListener {
+            initBrushState()
+            iv_brush_view_brush2.alpha = 1f
+        }
+        iv_brush_view_brush3.setOnClickListener {
+            initBrushState()
+            iv_brush_view_brush3.alpha = 1f
+        }
+        iv_brush_view_brush4.setOnClickListener {
+            initBrushState()
+            iv_brush_view_brush4.alpha = 1f
+        }
+        iv_brush_view_brush5.setOnClickListener {
+            initBrushState()
+            iv_brush_view_brush5.alpha = 1f
+        }
+    }
+
+    fun setBrushSize(size: Int, onSeekBarChangeListener: SeekBar.OnSeekBarChangeListener){
+        tv_brush_view_size.text = "Size: " + size.toString() + "px"
+        seek_bar_brush_view_size.progress = size
+        seek_bar_brush_view_size.setOnSeekBarChangeListener(onSeekBarChangeListener)
+    }
+
+    fun setOnDoneClick(onClickListener: OnClickListener){
+        btn_brush_view_done.setOnClickListener(onClickListener)
+    }
+
+    fun getBrushSize() : Int{
+        return seek_bar_brush_view_size.progress
+    }
+
+    private fun initColorState(){
+        iv_brush_view_color1.background = null
+        iv_brush_view_color2.background = null
+        iv_brush_view_color3.background = null
+        iv_brush_view_color4.background = null
+        iv_brush_view_color5.background = null
+        iv_brush_view_color6.background = null
+        iv_brush_view_color7.background = null
+        iv_brush_view_color8.background = null
+        iv_brush_view_color9.background = null
+        iv_brush_view_color10.background = null
+    }
+
+    private fun initBrushState(){
+        iv_brush_view_brush1.alpha = 0.7f
+        iv_brush_view_brush2.alpha = 0.7f
+        iv_brush_view_brush3.alpha = 0.7f
+        iv_brush_view_brush4.alpha = 0.7f
+        iv_brush_view_brush5.alpha = 0.7f
+    }
+}

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

@@ -32,8 +32,4 @@ class ControlSceneView : RelativeLayout {
     fun setonClickDuplicateBtn(onClickListener: OnClickListener) {
         duplicate.setOnClickListener(onClickListener)
     }
-
-//    fun setOnFinishClickListener(onClickListener: OnClickListener) {
-//        finish.setOnClickListener(onClickListener)
-//    }
 }

+ 42 - 0
src/main/java/com/bomostory/sceneeditmodule/screen/view/PaintView.kt

@@ -0,0 +1,42 @@
+package com.bomostory.sceneeditmodule.screen.view
+
+import android.content.Context
+import android.graphics.*
+import android.support.constraint.ConstraintLayout
+import android.util.AttributeSet
+import android.view.MotionEvent
+import android.view.View
+
+class PaintView: ConstraintLayout , View.OnTouchListener{
+
+    var paint = Paint()
+    private var points = ArrayList<Point>()
+    constructor(context: Context) : super(context)
+
+
+    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
+
+
+    constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle)
+
+
+    override fun onTouch(v: View?, event: MotionEvent): Boolean {
+        val point = Point()
+        point.x = event.getX().toInt()
+        point.y = event.getY().toInt()
+        points.add(point)
+        invalidate()
+        return true
+    }
+    override fun onDraw(canvas: Canvas?) {
+        super.onDraw(canvas)
+        val mPaint = Paint()
+        mPaint.style = Paint.Style.FILL
+        mPaint.strokeWidth = 5f
+        mPaint.isAntiAlias = true
+        mPaint.color = Color.parseColor("#4e342e")
+        for (point in points) {
+            canvas?.drawCircle(point.x.toFloat(), point.y.toFloat(), 5f, mPaint)
+        }
+    }
+}

+ 19 - 0
src/main/java/com/bomostory/sceneeditmodule/utils/FileUtils.kt

@@ -35,6 +35,25 @@ object FileUtils {
         }
     }
 
+    fun saveBitmapForActor(context: Context, bitmap: Bitmap?, fileName: String){
+        val dir = File(Config.IMAGE_FOLDER,"")
+        dir.mkdir()
+        val file = File(Config.IMAGE_FOLDER, fileName)
+        try {
+            val bos = BufferedOutputStream(FileOutputStream(file))
+            bitmap?.compress(Bitmap.CompressFormat.JPEG, 80, bos)
+            bos.flush()
+            bos.close()
+            if (context is OnSaveActorImage) {
+                context.onSaveActorImage(file.path)
+            } else {
+                throw RuntimeException(context.toString() + " must implement OnFragmentInteractionListener")
+            }
+        } catch (e: Exception) {
+            e.printStackTrace()
+        }
+    }
+
     fun saveProject(context: Context, project: Project, scaleWidth: Int, scaleHeight: Int): Completable {
         return Completable.create {
             try {

+ 8 - 0
src/main/res/drawable/ic_brush_1.xml

@@ -0,0 +1,8 @@
+<vector android:height="24dp" android:viewportHeight="72"
+    android:viewportWidth="36" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha="0" android:fillColor="#FFF"
+        android:fillType="nonZero" android:pathData="M0,0h36v72H0z"/>
+    <path android:fillColor="#595553" android:fillType="nonZero" android:pathData="M28,71.679L8,71.679L8,33.72L17.32,8.054c0.376,-1.034 0.985,-1.032 1.36,0L28,33.72v37.958z"/>
+    <path android:fillColor="#EBEAE4" android:fillType="evenOdd" android:pathData="M8,33.794h20v37.958L8,71.752z"/>
+    <path android:fillColor="#FFF" android:fillType="evenOdd" android:pathData="M13.714,7h7.857v4.466L13.714,11.466z"/>
+</vector>

+ 6 - 0
src/main/res/drawable/ic_brush_2.xml

@@ -0,0 +1,6 @@
+<vector android:height="24dp" android:viewportHeight="72"
+    android:viewportWidth="36" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#595553" android:fillType="nonZero" android:pathData="M28,72L8,72L8,31.764L14.429,9.037h0.714l0.088,-0.308c1.53,-5.307 4.01,-5.303 5.538,0l0.088,0.308h0.714L28,31.764L28,72z"/>
+    <path android:fillColor="#EBEAE4" android:fillType="evenOdd" android:pathData="M7.286,31.956h21.429L28.715,72L7.286,72z"/>
+    <path android:fillColor="#FFF" android:fillType="evenOdd" android:pathData="M15.381,4.252h5.476v4.785L15.143,9.037z"/>
+</vector>

+ 6 - 0
src/main/res/drawable/ic_brush_3.xml

@@ -0,0 +1,6 @@
+<vector android:height="24dp" android:viewportHeight="72"
+    android:viewportWidth="36" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#595553" android:fillType="nonZero" android:pathData="M26.294,35.503L27.878,72L8.25,72l1.566,-36.497A1.052,1.052 0,0 1,10.854 34.5L12,34.5s-1.981,-8.781 -2.141,-15.216C14.119,17.507 17.256,5.25 17.256,5.25h0.965s3.137,12.257 7.398,14.034C25.46,25.72 23.69,34.5 23.69,34.5h1.564c0.551,0 1.016,0.45 1.04,1.003zM18,25.5a1.5,1.5 0,1 0,0 -3,1.5 1.5,0 0,0 0,3z"/>
+    <path android:fillColor="#FFF" android:fillType="evenOdd" android:pathData="M8.25,3h19.5v31.5L8.25,34.5z"/>
+    <path android:fillColor="#EBEAE4" android:fillType="evenOdd" android:pathData="M7.5,36.75h21L28.5,72h-21z"/>
+</vector>

+ 9 - 0
src/main/res/drawable/ic_brush_4.xml

@@ -0,0 +1,9 @@
+<vector android:height="24dp" android:viewportHeight="72"
+    android:viewportWidth="36" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#595553" android:fillType="nonZero" android:pathData="M24.762,38.5C28.789,22 18.789,10.324 16.982,6.133 13.659,10.323 8,23.5 11.238,38.5L9.995,38.5A1.997,1.997 0,0 0,8 40.495L8,72h20L28,40.495a2,2 0,0 0,-1.995 -1.995h-1.243z"/>
+    <path android:fillColor="#595553" android:fillType="nonZero" android:pathData="M24.762,38.5C28.789,22 18.789,10.324 16.982,6.133 13.659,10.323 8,23.5 11.238,38.5L9.995,38.5A1.997,1.997 0,0 0,8 40.495L8,72h20L28,40.495a2,2 0,0 0,-1.995 -1.995h-1.243z"/>
+    <path android:fillColor="#EBEAE4" android:fillType="evenOdd" android:pathData="M6.947,41h22.105v31L6.947,72z"/>
+    <path android:fillColor="#FFF" android:fillType="evenOdd" android:pathData="M6.947,3.5h22.105v35L6.947,38.5z"/>
+    <path android:fillAlpha=".12" android:fillColor="#000"
+        android:fillType="evenOdd" android:pathData="M8.526,5.5S14.842,-2 16.947,6.25C8,24 14.842,38.5 14.842,38.5L8.526,38.5v-33z"/>
+</vector>

+ 7 - 0
src/main/res/drawable/ic_brush_eraser.xml

@@ -0,0 +1,7 @@
+<vector android:height="24dp" android:viewportHeight="72"
+    android:viewportWidth="36" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#EBEAE4" android:fillType="nonZero" android:pathData="M4,38.351h28V72H4z"/>
+    <path android:fillColor="#595553" android:fillType="nonZero" android:pathData="M4,38.351h28v1.979H4z"/>
+    <path android:fillColor="#E8E9EA" android:fillType="nonZero" android:pathData="M31,38.35H5V27.39c0,-1.658 0.596,-3.346 2.039,-3.389h13.896c5.959,0 10.005,3.793 10.005,8.705 0,4.913 0.06,5.646 0.06,5.646z"/>
+    <path android:fillColor="#F7F7F7" android:fillType="nonZero" android:pathData="M29,38.35H5.5V27.768c0,-1.6 0.539,-3.23 1.843,-3.272h12.56c5.386,0 9.043,3.661 9.043,8.404 0,4.744 0.054,5.452 0.054,5.452z"/>
+</vector>

+ 17 - 5
src/main/res/layout/activity_scene_edit.xml

@@ -2,6 +2,7 @@
 <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:id="@+id/activity_scene_edit"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="#212121"
@@ -22,13 +23,24 @@
             android:src="@drawable/ic_button_back_01"/>
     </RelativeLayout>
 
-     <com.bomostory.sceneeditmodule.screen.view.SceneView1
-        android:id="@+id/sceneEditView"
+    <android.support.constraint.ConstraintLayout
+        android:id="@+id/scene_view_container"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:background="@android:color/holo_blue_dark"
-        app:layout_constraintTop_toBottomOf="@+id/bar"/>
-
+        app:layout_constraintTop_toBottomOf="@+id/bar">
+        <com.bomostory.sceneeditmodule.screen.view.SceneView1
+            android:id="@+id/sceneEditView"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"/>
+    </android.support.constraint.ConstraintLayout>
+    <com.bomostory.sceneeditmodule.screen.view.PaintView
+        android:id="@+id/paint_view"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:background="#ffffff"
+        android:visibility="invisible"
+        app:layout_constraintTop_toBottomOf="@+id/bar">
+    </com.bomostory.sceneeditmodule.screen.view.PaintView>
     <RelativeLayout
         android:id="@+id/viewContainer"
         android:layout_width="match_parent"

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

@@ -67,7 +67,6 @@
                 android:scaleType="center"
                 android:background="#212121"
                 android:layout_centerHorizontal="true"
-                android:tint="@android:color/darker_gray"
                 android:src="@drawable/ic_brush"/>
             <TextView
                 android:layout_width="wrap_content"
@@ -75,7 +74,7 @@
                 android:layout_below="@+id/brush_btn"
                 android:layout_centerInParent="true"
                 android:text="Brush"
-                android:textColor="@android:color/darker_gray"/>
+                android:textColor="#ffecb3"/>
         </RelativeLayout>
         <RelativeLayout
             android:id="@+id/dialogue"
@@ -134,7 +133,6 @@
                 android:scaleType="center"
                 android:background="#212121"
                 android:layout_centerHorizontal="true"
-                android:drawableTint="@android:color/darker_gray"
                 android:drawableTop="@drawable/ic_settings" />
             <TextView
                 android:layout_width="wrap_content"
@@ -142,7 +140,7 @@
                 android:layout_below="@+id/settings_btn"
                 android:layout_centerInParent="true"
                 android:text="Settings"
-                android:textColor="@android:color/darker_gray"/>
+                android:textColor="#ffecb3"/>
         </RelativeLayout>
     </RelativeLayout>
 </RelativeLayout>

+ 6 - 0
src/main/res/layout/paint_view.xml

@@ -0,0 +1,6 @@
+<?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="match_parent"
+    android:background="#ffffff">
+</LinearLayout>

+ 218 - 0
src/main/res/layout/scene_brush_view.xml

@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="#212121">
+
+    <ImageView
+        android:id="@+id/iv_brush_view_brush1"
+        android:layout_width="36dp"
+        android:layout_height="48dp"
+        android:scaleType="fitXY"
+        android:src="@drawable/ic_brush_1"
+        android:layout_marginLeft="24dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintHorizontal_chainStyle="packed"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toLeftOf="@+id/iv_brush_view_brush2" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_brush2"
+        android:layout_width="36dp"
+        android:layout_height="72dp"
+        android:layout_marginLeft="16dp"
+        android:scaleType="fitXY"
+        android:src="@drawable/ic_brush_2"
+        android:alpha="0.7"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toRightOf="@+id/iv_brush_view_brush1"
+        app:layout_constraintRight_toLeftOf="@+id/iv_brush_view_brush3" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_brush3"
+        android:layout_width="36dp"
+        android:layout_height="48dp"
+        android:layout_marginLeft="16dp"
+        android:scaleType="fitXY"
+        android:src="@drawable/ic_brush_3"
+        android:alpha="0.7"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toRightOf="@+id/iv_brush_view_brush2"
+        app:layout_constraintRight_toLeftOf="@+id/iv_brush_view_brush4" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_brush4"
+        android:layout_width="36dp"
+        android:layout_height="48dp"
+        android:layout_marginLeft="16dp"
+        android:scaleType="fitXY"
+        android:src="@drawable/ic_brush_4"
+        android:alpha="0.7"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toRightOf="@+id/iv_brush_view_brush3"
+        app:layout_constraintRight_toLeftOf="@+id/iv_brush_view_brush5" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_brush5"
+        android:layout_width="36dp"
+        android:layout_height="48dp"
+        android:layout_marginLeft="16dp"
+        android:scaleType="fitXY"
+        android:src="@drawable/ic_brush_eraser"
+        android:alpha="0.7"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toRightOf="@+id/iv_brush_view_brush4"
+        app:layout_constraintRight_toLeftOf="@+id/seek_bar_brush_view_size"/>
+
+    <TextView
+        android:id="@+id/tv_brush_view_size"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="Size:"
+        android:textColor="#ffffff"
+        app:layout_constraintLeft_toLeftOf="@+id/seek_bar_brush_view_size"
+        app:layout_constraintBottom_toTopOf="@id/seek_bar_brush_view_size"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <android.support.v7.widget.AppCompatSeekBar
+        android:id="@+id/seek_bar_brush_view_size"
+        android:layout_width="240dp"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="36dp"
+        app:layout_constraintHorizontal_bias="0.5"
+        app:layout_constraintLeft_toRightOf="@+id/iv_brush_view_brush5"
+        app:layout_constraintRight_toLeftOf="@+id/iv_brush_view_color1"
+        app:layout_constraintTop_toBottomOf="@+id/tv_brush_view_size" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_color1"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginLeft="30dp"
+        android:scaleType="center"
+        android:src="@drawable/btn_edit_text_dialog_circle_red"
+        app:layout_constraintLeft_toRightOf="@+id/seek_bar_brush_view_size"
+        app:layout_constraintRight_toLeftOf="@+id/iv_brush_view_color2"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_color2"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginLeft="30dp"
+        android:scaleType="center"
+        android:src="@drawable/btn_edit_text_dialog_circle_red"
+        app:layout_constraintLeft_toRightOf="@+id/iv_brush_view_color1"
+        app:layout_constraintRight_toLeftOf="@+id/iv_brush_view_color3"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_color3"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginLeft="30dp"
+        android:scaleType="center"
+        android:src="@drawable/btn_edit_text_dialog_circle_red"
+        app:layout_constraintLeft_toRightOf="@id/iv_brush_view_color2"
+        app:layout_constraintRight_toLeftOf="@+id/iv_brush_view_color4"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_color4"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginLeft="30dp"
+        android:scaleType="center"
+        android:src="@drawable/btn_edit_text_dialog_circle_red"
+        app:layout_constraintLeft_toRightOf="@+id/iv_brush_view_color3"
+        app:layout_constraintRight_toLeftOf="@+id/iv_brush_view_color5"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_color5"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginLeft="30dp"
+        android:scaleType="center"
+        android:src="@drawable/btn_edit_text_dialog_circle_red"
+        app:layout_constraintLeft_toRightOf="@+id/iv_brush_view_color4"
+        app:layout_constraintRight_toLeftOf="@+id/btn_brush_view_tune"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_color6"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginBottom="4dp"
+        android:scaleType="center"
+        android:src="@drawable/btn_edit_text_dialog_circle_red"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_brush_view_color1" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_color7"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginBottom="4dp"
+        android:scaleType="center"
+        android:src="@drawable/btn_edit_text_dialog_circle_red"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_brush_view_color2"/>
+
+    <ImageView
+        android:id="@+id/iv_brush_view_color8"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginBottom="4dp"
+        android:scaleType="center"
+        android:src="@drawable/btn_edit_text_dialog_circle_red"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_brush_view_color3" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_color9"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginBottom="4dp"
+        android:scaleType="center"
+        android:src="@drawable/btn_edit_text_dialog_circle_red"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_brush_view_color4" />
+
+    <ImageView
+        android:id="@+id/iv_brush_view_color10"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginBottom="4dp"
+        android:scaleType="center"
+        android:src="@drawable/btn_edit_text_dialog_circle_red"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_brush_view_color5" />
+
+    <Button
+        android:id="@+id/btn_brush_view_tune"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_marginLeft="24dp"
+        android:layout_marginRight="24dp"
+        android:background="#212121"
+        android:drawableStart="@drawable/ic_tune"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toRightOf="@+id/iv_brush_view_color5"
+        app:layout_constraintRight_toLeftOf="@+id/btn_brush_view_done"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <Button
+        android:id="@+id/btn_brush_view_done"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="24dp"
+        android:background="@drawable/btn_round_corner_main"
+        android:drawableStart="@drawable/ic_done"
+        android:text="DONE"
+        android:textColor="#4e342e"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+</android.support.constraint.ConstraintLayout>