Ver código fonte

Merge remote-tracking branch 'origin/master' into mediaBoxLayout

cooperku_kdanmobile 5 anos atrás
pai
commit
6b5ffebfbb
70 arquivos alterados com 365 adições e 192 exclusões
  1. 1 1
      reader/src/main/AndroidManifest.xml
  2. 29 29
      reader/src/main/java/com/kdanmobile/reader/ReaderActivity.kt
  3. 9 9
      reader/src/main/java/com/kdanmobile/reader/screen/view/ViewerEditTabView.kt
  4. 41 37
      reader/src/main/java/com/kdanmobile/reader/screen/view/ViewerEditView.kt
  5. 10 10
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TitleButton.kt
  6. 16 16
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TextSeekBar.kt
  7. 6 4
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/ShapeTabView.kt
  8. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/OnSignatureAddListener.kt
  9. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/OnSignatureClickListener.kt
  10. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/OnSignatureRemoveListener.kt
  11. 1 2
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/SignatureAdapter.kt
  12. 2 2
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/SignatureRecyclerViewItemDecoration.kt
  13. 6 6
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/SignatureTabView.kt
  14. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/CustomStampAdapter.kt
  15. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/CustomStampType.kt
  16. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/OnStampClickListener.kt
  17. 3 2
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/StampTabView.kt
  18. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/StandardStampAdapter.kt
  19. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TextAttrView.kt
  20. 3 2
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TextBoxTabView.kt
  21. 6 7
      reader/src/main/java/com/kdanmobile/reader/screen/SignatureActivity.kt
  22. 4 5
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/SignatureDrawView.kt
  23. BIN
      reader/src/main/res/drawable-hdpi/ic_bookmark.png
  24. BIN
      reader/src/main/res/drawable-hdpi/ic_bookmark_border.png
  25. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_bookmk_h.png
  26. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_bookmk_nor.png
  27. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_outline_h.png
  28. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_outline_nor.png
  29. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_search_h.png
  30. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_search_nor.png
  31. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_thumbnail_h.png
  32. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_thumbnail_nor.png
  33. BIN
      reader/src/main/res/drawable-xhdpi/ic_bookmark.png
  34. BIN
      reader/src/main/res/drawable-xhdpi/ic_bookmark_border.png
  35. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_bookmk_h.png
  36. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_bookmk_nor.png
  37. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_outline_h.png
  38. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_outline_nor.png
  39. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_search_h.png
  40. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_search_nor.png
  41. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_thumbnail_h.png
  42. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_thumbnail_nor.png
  43. BIN
      reader/src/main/res/drawable-xxhdpi/ic_bookmark.png
  44. BIN
      reader/src/main/res/drawable-xxhdpi/ic_bookmark_border.png
  45. 1 1
      reader/src/main/res/drawable-xhdpi/bg_reader_tool_bar_left.xml
  46. 16 0
      reader/src/main/res/drawable/bg_reader_tool_bar_left_expand.xml
  47. 1 1
      reader/src/main/res/drawable/bg_reader_tool_bar_right.xml
  48. 12 0
      reader/src/main/res/drawable/ic_bookmark_border.xml
  49. 12 0
      reader/src/main/res/drawable/ic_bookmark_fill.xml
  50. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_bookmarks.xml
  51. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_bookmarks_selected.xml
  52. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_outline.xml
  53. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_outline_selected.xml
  54. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_search.xml
  55. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_search_selected.xml
  56. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_thumbnails.xml
  57. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_thumbnails_selected.xml
  58. 27 7
      reader/src/main/res/layout/activity_reader.xml
  59. 2 2
      reader/src/main/res/layout/activity_view_signature_create.xml
  60. 9 9
      reader/src/main/res/layout/view_viewer_edit.xml
  61. 2 2
      reader/src/main/res/layout/view_viewer_edit_item_title_button.xml
  62. 9 9
      reader/src/main/res/layout/view_viewer_edit_item_seekbar.xml
  63. 11 9
      reader/src/main/res/layout/view_viewer_edit_tab.xml
  64. 2 2
      reader/src/main/res/layout/view_viewer_edit_item_shape_border.xml
  65. 1 1
      reader/src/main/res/layout/view_viewer_edit_item_shape_fill.xml
  66. 1 1
      reader/src/main/res/layout/view_viewer_edit_tab_shape.xml
  67. 1 1
      reader/src/main/res/layout/view_viewer_edit_tab_stamp.xml
  68. 3 3
      reader/src/main/res/layout/view_viewer_edit_tab_text_box.xml
  69. 2 2
      reader/src/main/res/values/attrs.xml
  70. 4 2
      reader/src/main/res/values/colors.xml

+ 1 - 1
reader/src/main/AndroidManifest.xml

@@ -10,7 +10,7 @@
             android:name=".screen.ViewerSettingActivity"
             android:theme="@style/ReaderActivityNoActionBarNoTitle" />
         <activity
-            android:name=".screen.SignatureActivity"
+            android:name=".screen.signature.SignatureActivity"
             android:screenOrientation="landscape"
             android:theme="@style/ReaderActivityNoActionBarNoTitle" />
     </application>

+ 29 - 29
reader/src/main/java/com/kdanmobile/reader/ReaderActivity.kt

@@ -9,11 +9,6 @@ import android.os.Build
 import android.os.Bundle
 import android.support.constraint.ConstraintLayout
 import android.support.constraint.ConstraintSet
-import android.widget.Toast
-import com.kdanmobile.kmpdfkit.pdfcommon.KMPDFReaderView
-import com.kdanmobile.reader.Utils.applyConstraintSet
-import com.kdanmobile.reader.view.AnnotationAttributeView
-import com.kdanmobile.reader.view.AnnotationAttributeWindow
 import android.support.v4.content.ContextCompat
 import android.support.v7.app.AlertDialog
 import android.support.v7.app.AppCompatActivity
@@ -25,22 +20,27 @@ import android.view.View
 import android.widget.EditText
 import android.widget.LinearLayout
 import android.widget.TextView
+import android.widget.Toast
 import com.kdanmobile.kmpdfkit.globaldata.KMPDFAnnotEditMode
+import com.kdanmobile.kmpdfkit.pdfcommon.KMPDFReaderView
+import com.kdanmobile.reader.Utils.applyConstraintSet
 import com.kdanmobile.reader.annotationattribute.AnnotationAttribute
 import com.kdanmobile.reader.annotationattribute.AnnotationColor
 import com.kdanmobile.reader.annotationattribute.InkAttribute
+import com.kdanmobile.reader.screen.ViewerSettingActivity
+import com.kdanmobile.reader.screen.reader.mediabox.MediaBoxView
+import com.kdanmobile.reader.screen.reader.mediabox.shape.ShapeTabView
+import com.kdanmobile.reader.screen.reader.mediabox.signature.SignatureTabView
+import com.kdanmobile.reader.screen.reader.mediabox.stamp.StampTabView
+import com.kdanmobile.reader.screen.reader.mediabox.textbox.TextBoxTabView
 import com.kdanmobile.reader.screen.view.BookmarkView
 import com.kdanmobile.reader.screen.view.OutlineView
 import com.kdanmobile.reader.screen.view.SearchView
 import com.kdanmobile.reader.screen.view.ThumbnailView
-import com.kdanmobile.reader.screen.ViewerSettingActivity
-import com.kdanmobile.reader.screen.view.*
-import com.kdanmobile.reader.screen.view.edit.ShapeTabView
-import com.kdanmobile.reader.screen.view.edit.SignatureTabView
-import com.kdanmobile.reader.screen.view.edit.StampTabView
-import com.kdanmobile.reader.screen.view.edit.TextBoxTabView
 import com.kdanmobile.reader.utils.AnimationUtil
 import com.kdanmobile.reader.utils.DensityUtil
+import com.kdanmobile.reader.view.AnnotationAttributeView
+import com.kdanmobile.reader.view.AnnotationAttributeWindow
 import kotlinx.android.synthetic.main.activity_reader.*
 
 abstract class ReaderActivity : AppCompatActivity() {
@@ -315,7 +315,7 @@ abstract class ReaderActivity : AppCompatActivity() {
     private fun onIsPageInBookmarksChanged(isPageInBookmarks: Boolean?) {
         isPageInBookmarks?.let {
             if (it) {
-                menuItemBookmark?.icon = ContextCompat.getDrawable(this, R.drawable.ic_bookmark)
+                menuItemBookmark?.icon = ContextCompat.getDrawable(this, R.drawable.ic_bookmark_fill)
             } else {
                 menuItemBookmark?.icon = ContextCompat.getDrawable(this, R.drawable.ic_bookmark_border)
             }
@@ -481,23 +481,23 @@ abstract class ReaderActivity : AppCompatActivity() {
         viewerEditView.apply {
             onShowListener = Runnable { onMediaBoxShown() }
             onDismissListener = Runnable { onMediaBoxDismissed() }
-            onViewerEditTabAddButtonClickListener = object : ViewerEditView.OnViewerEditTabAddButtonClickListener {
-                override fun onTabTextBoxAddButtonClick(textBoxTabView: TextBoxTabView) {
+            onClickAddButtonListener = object : MediaBoxView.OnClickAddButtonListener {
+                override fun onClickTextBoxAddButton(textBoxTabView: TextBoxTabView) {
                     dismiss(false)
                     viewModel.setTextBoxAttribute(textBoxTabView.getTextBoxAttribute())
                 }
 
-                override fun onTabSignatureAddButtonClick(signatureTabView: SignatureTabView) {
+                override fun onClickSignatureAddButton(signatureTabView: SignatureTabView) {
                     dismiss(false)
                     viewModel.setSignatureAttribute(signatureTabView.getSignatureAttribute())
                 }
 
-                override fun onTabStampAddButtonClick(stampTabView: StampTabView) {
+                override fun onClickStampAddButton(stampTabView: StampTabView) {
                     dismiss(false)
                     viewModel.setStampAttribute(stampTabView.getStampAttribute())
                 }
 
-                override fun onTabShapeAddButtonClick(shapeTabView: ShapeTabView) {
+                override fun onClickShapeAddButton(shapeTabView: ShapeTabView) {
                     dismiss(false)
                     viewModel.setShapeAttribute(shapeTabView.getShapeAttribute())
                 }
@@ -630,10 +630,10 @@ abstract class ReaderActivity : AppCompatActivity() {
     }
 
     private fun changeLeftToolbarType(type: LeftToolbarType) {
-        iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_pagelist_thumbnail_nor)
-        iv_readerActivity_bookmark.setImageResource(R.drawable.ic_pagelist_bookmk_nor)
-        iv_readerActivity_outline.setImageResource(R.drawable.ic_pagelist_outline_nor)
-        iv_readerActivity_search.setImageResource(R.drawable.ic_pagelist_search_nor)
+        iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_left_toolbar_thumbnails)
+        iv_readerActivity_bookmark.setImageResource(R.drawable.ic_left_toolbar_bookmarks)
+        iv_readerActivity_outline.setImageResource(R.drawable.ic_left_toolbar_outline)
+        iv_readerActivity_search.setImageResource(R.drawable.ic_left_toolbar_search)
 
         val width = when (type) {
             LeftToolbarType.THUMBNAIL -> w_240
@@ -667,9 +667,9 @@ abstract class ReaderActivity : AppCompatActivity() {
                 thumbnailView.setHandlers(viewModel.pdfInfoHandler, viewModel.thumbnailHandler)
                 linearLayout_readerActivity_leftToolbarContainer.addView(thumbnailView)
             }
-            iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_pagelist_thumbnail_h)
+            iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_left_toolbar_thumbnails_selected)
         } else {
-            iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_pagelist_thumbnail_nor)
+            iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_left_toolbar_thumbnails)
         }
         leftToolbarType = type
     }
@@ -684,9 +684,9 @@ abstract class ReaderActivity : AppCompatActivity() {
                 bookmarkView.setHandlers(viewModel.pdfInfoHandler, viewModel.thumbnailHandler, viewModel.bookmarkHandler)
                 linearLayout_readerActivity_leftToolbarContainer.addView(bookmarkView)
             }
-            iv_readerActivity_bookmark.setImageResource(R.drawable.ic_pagelist_bookmk_h)
+            iv_readerActivity_bookmark.setImageResource(R.drawable.ic_left_toolbar_bookmarks_selected)
         } else {
-            iv_readerActivity_bookmark.setImageResource(R.drawable.ic_pagelist_bookmk_nor)
+            iv_readerActivity_bookmark.setImageResource(R.drawable.ic_left_toolbar_bookmarks)
         }
         leftToolbarType = type
     }
@@ -701,9 +701,9 @@ abstract class ReaderActivity : AppCompatActivity() {
                 outlineView.setHandlers(viewModel.pdfInfoHandler, viewModel.outlineHandler)
                 linearLayout_readerActivity_leftToolbarContainer.addView(outlineView)
             }
-            iv_readerActivity_outline.setImageResource(R.drawable.ic_pagelist_outline_h)
+            iv_readerActivity_outline.setImageResource(R.drawable.ic_left_toolbar_outline_selected)
         } else {
-            iv_readerActivity_outline.setImageResource(R.drawable.ic_pagelist_outline_nor)
+            iv_readerActivity_outline.setImageResource(R.drawable.ic_left_toolbar_outline)
         }
         leftToolbarType = type
     }
@@ -718,9 +718,9 @@ abstract class ReaderActivity : AppCompatActivity() {
                 searchView.setHandlers(viewModel.pdfInfoHandler, viewModel.searchHandler)
                 linearLayout_readerActivity_leftToolbarContainer.addView(searchView)
             }
-            iv_readerActivity_search.setImageResource(R.drawable.ic_pagelist_search_h)
+            iv_readerActivity_search.setImageResource(R.drawable.ic_left_toolbar_search_selected)
         } else {
-            iv_readerActivity_search.setImageResource(R.drawable.ic_pagelist_search_nor)
+            iv_readerActivity_search.setImageResource(R.drawable.ic_left_toolbar_search)
             hideSearchViewSoftKeyboard()
         }
         leftToolbarType = type

+ 9 - 9
reader/src/main/java/com/kdanmobile/reader/screen/view/ViewerEditTabView.kt

@@ -1,42 +1,42 @@
-package com.kdanmobile.reader.screen.view
+package com.kdanmobile.reader.screen.reader.mediabox
 
 import android.content.Context
 import android.support.constraint.ConstraintLayout
 import android.util.AttributeSet
 import android.view.LayoutInflater
 import com.kdanmobile.reader.R
-import kotlinx.android.synthetic.main.view_viewer_edit_tab.view.*
+import kotlinx.android.synthetic.main.view_media_box_tab.view.*
 
-class ViewerEditTabView : ConstraintLayout {
+class MediaBoxTabView : ConstraintLayout {
 
     var onClickListenerTabTextBox: OnClickListener? = null
         set(value) {
             field = value
-            viewerEdit_tab_textBox?.setOnClickListener(value)
+            ib_mediaBoxTab_textBox?.setOnClickListener(value)
         }
 
     var onClickListenerTabSignature: OnClickListener? = null
         set(value) {
             field = value
-            viewerEdit_tab_signature?.setOnClickListener(value)
+            ib_mediaBoxTab_signature?.setOnClickListener(value)
         }
 
     var onClickListenerTabStamp: OnClickListener? = null
         set(value) {
             field = value
-            viewerEdit_tab_stamp?.setOnClickListener(value)
+            ib_mediaBoxTab_stamp?.setOnClickListener(value)
         }
 
     var onClickListenerTabShape: OnClickListener? = null
         set(value) {
             field = value
-            viewerEdit_tab_shape?.setOnClickListener(value)
+            ib_mediaBoxTab_shape?.setOnClickListener(value)
         }
 
     var onClickListenerTabForm: OnClickListener? = null
         set(value) {
             field = value
-            viewerEdit_tab_form?.setOnClickListener(value)
+            ib_mediaBoxTab_form?.setOnClickListener(value)
         }
 
     constructor(context: Context) : super(context) {
@@ -52,6 +52,6 @@ class ViewerEditTabView : ConstraintLayout {
     }
 
     private fun initView() {
-        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_tab, this)
+        LayoutInflater.from(context).inflate(R.layout.view_media_box_tab, this)
     }
 }

+ 41 - 37
reader/src/main/java/com/kdanmobile/reader/screen/view/ViewerEditView.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view
+package com.kdanmobile.reader.screen.reader.mediabox
 
 import android.animation.*
 import android.content.Context
@@ -12,11 +12,15 @@ import android.view.View.OnClickListener
 import android.view.animation.AccelerateDecelerateInterpolator
 import android.widget.ImageButton
 import com.kdanmobile.reader.R
-import com.kdanmobile.reader.screen.view.edit.*
-import kotlinx.android.synthetic.main.view_viewer_edit.view.*
-import kotlinx.android.synthetic.main.view_viewer_edit_tab.view.*
+import com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxHeader
+import com.kdanmobile.reader.screen.reader.mediabox.shape.ShapeTabView
+import com.kdanmobile.reader.screen.reader.mediabox.signature.SignatureTabView
+import com.kdanmobile.reader.screen.reader.mediabox.stamp.StampTabView
+import com.kdanmobile.reader.screen.reader.mediabox.textbox.TextBoxTabView
+import kotlinx.android.synthetic.main.view_media_box.view.*
+import kotlinx.android.synthetic.main.view_media_box_tab.view.*
 
-class ViewerEditView @JvmOverloads constructor(
+class MediaBoxView @JvmOverloads constructor(
         context: Context,
         attrs: AttributeSet? = null,
         defStyleAttr: Int = 0
@@ -40,19 +44,19 @@ class ViewerEditView @JvmOverloads constructor(
     private var maskAnimator: ValueAnimator? = null
     private var tabType = ViewerEditTabType.NONE
     private var selected: ImageButton? = null
-    var onViewerEditTabAddButtonClickListener: OnViewerEditTabAddButtonClickListener? = null
+    var onClickAddButtonListener: OnClickAddButtonListener? = null
 
     init {
-        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit, this)
+        LayoutInflater.from(context).inflate(R.layout.view_media_box, this)
         visibility = View.INVISIBLE
         setupTabView()
 
         /** Set empty listener to prevent dismissing by clicking box **/
-        view_viewEdit_content.setOnClickListener {}
+        view_mediaBox_dialog.setOnClickListener {}
 
         /** Move media box view to bottom of parent(hide it) **/
         val size = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)
-        val v = view_viewEdit_content
+        val v = view_mediaBox_dialog
         v.measure(size, size)
         v.y = v.top + v.measuredHeight.toFloat()
     }
@@ -106,7 +110,7 @@ class ViewerEditView @JvmOverloads constructor(
 
     private fun showMediaBoxWithAnimation() {
         mediaBoxAnimator?.cancel()
-        val v = view_viewEdit_content
+        val v = view_mediaBox_dialog
         v.visibility = View.VISIBLE
         val from = v.y
         val to = v.top.toFloat()
@@ -126,7 +130,7 @@ class ViewerEditView @JvmOverloads constructor(
 
     private fun hideMediaBoxWithAnimation() {
         mediaBoxAnimator?.cancel()
-        val v = view_viewEdit_content
+        val v = view_mediaBox_dialog
         val from = v.y
         val to = v.top.toFloat() + v.height
         val holder = PropertyValuesHolder.ofFloat("Y", from, to)
@@ -138,7 +142,7 @@ class ViewerEditView @JvmOverloads constructor(
                     super.onAnimationEnd(animation)
                     removeListener(this)
                     v.visibility = View.INVISIBLE
-                    this@ViewerEditView.visibility = View.GONE
+                    this@MediaBoxView.visibility = View.GONE
                 }
             })
             start()
@@ -146,13 +150,13 @@ class ViewerEditView @JvmOverloads constructor(
     }
 
     private fun setupTabView() {
-        viewerEdit_tab.onClickListenerTabTextBox = OnClickListener(this::setupTextBoxView)
-        viewerEdit_tab.onClickListenerTabSignature = OnClickListener(this::setupSignatureView)
-        viewerEdit_tab.onClickListenerTabStamp = OnClickListener(this::setupStampView)
-        viewerEdit_tab.onClickListenerTabShape = OnClickListener(this::setupShapeView)
-        viewerEdit_tab.onClickListenerTabForm = OnClickListener(this::setupFormView)
+        mediaBoxTabView_mediaBox_tab.onClickListenerTabTextBox = OnClickListener(this::setupTextBoxView)
+        mediaBoxTabView_mediaBox_tab.onClickListenerTabSignature = OnClickListener(this::setupSignatureView)
+        mediaBoxTabView_mediaBox_tab.onClickListenerTabStamp = OnClickListener(this::setupStampView)
+        mediaBoxTabView_mediaBox_tab.onClickListenerTabShape = OnClickListener(this::setupShapeView)
+        mediaBoxTabView_mediaBox_tab.onClickListenerTabForm = OnClickListener(this::setupFormView)
 
-        setupTextBoxView(viewerEdit_tab_textBox)
+        setupTextBoxView(ib_mediaBoxTab_textBox)
     }
 
     private fun getButtonDrawable(tabType: ViewerEditTabType, isSelected: Boolean): Int {
@@ -178,7 +182,7 @@ class ViewerEditView @JvmOverloads constructor(
             selected = button
             button.setImageDrawable(ContextCompat.getDrawable(context, getButtonDrawable(this.tabType, true)))
 
-            viewEdit_layout_tab_content.removeAllViews()
+            viewGroup_mediaBox_pageContainer.removeAllViews()
             changed = true
         }
         return changed
@@ -189,10 +193,10 @@ class ViewerEditView @JvmOverloads constructor(
         if (changed) {
             val textBoxTabView = TextBoxTabView(context)
             val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
-            viewEdit_layout_tab_content.addView(textBoxTabView, params)
-            textBoxTabView.onTitleButtonClickListener = object: TitleButton.OnTitleButtonClickListener {
+            viewGroup_mediaBox_pageContainer.addView(textBoxTabView, params)
+            textBoxTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
                 override fun onTitleButtonClick() {
-                    onViewerEditTabAddButtonClickListener?.onTabTextBoxAddButtonClick(textBoxTabView)
+                    onClickAddButtonListener?.onClickTextBoxAddButton(textBoxTabView)
                 }
             }
         }
@@ -203,10 +207,10 @@ class ViewerEditView @JvmOverloads constructor(
         if (changed) {
             val signatureTabView = SignatureTabView(context)
             val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
-            viewEdit_layout_tab_content.addView(signatureTabView, params)
-            signatureTabView.onTitleButtonClickListener = object: TitleButton.OnTitleButtonClickListener {
+            viewGroup_mediaBox_pageContainer.addView(signatureTabView, params)
+            signatureTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
                 override fun onTitleButtonClick() {
-                    onViewerEditTabAddButtonClickListener?.onTabSignatureAddButtonClick(signatureTabView)
+                    onClickAddButtonListener?.onClickSignatureAddButton(signatureTabView)
                 }
             }
         }
@@ -217,10 +221,10 @@ class ViewerEditView @JvmOverloads constructor(
         if (changed) {
             val stampTabView = StampTabView(context)
             val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
-            viewEdit_layout_tab_content.addView(stampTabView, params)
-            stampTabView.onTitleButtonClickListener = object: TitleButton.OnTitleButtonClickListener {
+            viewGroup_mediaBox_pageContainer.addView(stampTabView, params)
+            stampTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
                 override fun onTitleButtonClick() {
-                    onViewerEditTabAddButtonClickListener?.onTabStampAddButtonClick(stampTabView)
+                    onClickAddButtonListener?.onClickStampAddButton(stampTabView)
                 }
             }
         }
@@ -231,10 +235,10 @@ class ViewerEditView @JvmOverloads constructor(
         if (changed) {
             val shapeTabView = ShapeTabView(context)
             val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
-            viewEdit_layout_tab_content.addView(shapeTabView, params)
-            shapeTabView.onTitleButtonClickListener = object: TitleButton.OnTitleButtonClickListener {
+            viewGroup_mediaBox_pageContainer.addView(shapeTabView, params)
+            shapeTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
                 override fun onTitleButtonClick() {
-                    onViewerEditTabAddButtonClickListener?.onTabShapeAddButtonClick(shapeTabView)
+                    onClickAddButtonListener?.onClickShapeAddButton(shapeTabView)
                 }
             }
         }
@@ -244,14 +248,14 @@ class ViewerEditView @JvmOverloads constructor(
         //TODO implements tab view and add to viewEdit_layout_tab_content
         val changed = setupContent(view as ImageButton, ViewerEditTabType.FORM)
         if (changed) {
-            LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_tab, viewEdit_layout_tab_content)
+            LayoutInflater.from(context).inflate(R.layout.view_media_box_tab, viewGroup_mediaBox_pageContainer)
         }
     }
 
-    interface OnViewerEditTabAddButtonClickListener {
-        fun onTabTextBoxAddButtonClick(textBoxTabView: TextBoxTabView)
-        fun onTabSignatureAddButtonClick(signatureTabView: SignatureTabView)
-        fun onTabStampAddButtonClick(stampTabView: StampTabView)
-        fun onTabShapeAddButtonClick(shapeTabView: ShapeTabView)
+    interface OnClickAddButtonListener {
+        fun onClickTextBoxAddButton(textBoxTabView: TextBoxTabView)
+        fun onClickSignatureAddButton(signatureTabView: SignatureTabView)
+        fun onClickStampAddButton(stampTabView: StampTabView)
+        fun onClickShapeAddButton(shapeTabView: ShapeTabView)
     }
 }

+ 10 - 10
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TitleButton.kt

@@ -1,13 +1,13 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.common
 
 import android.content.Context
 import android.support.constraint.ConstraintLayout
 import android.util.AttributeSet
 import android.view.LayoutInflater
 import com.kdanmobile.reader.R
-import kotlinx.android.synthetic.main.view_viewer_edit_item_title_button.view.*
+import kotlinx.android.synthetic.main.view_media_box_header.view.*
 
-class TitleButton : ConstraintLayout {
+class MediaBoxHeader : ConstraintLayout {
 
     private var title = ""
     private var buttonText = ""
@@ -15,7 +15,7 @@ class TitleButton : ConstraintLayout {
     var onTitleButtonClickListener: OnTitleButtonClickListener? = null
         set(value) {
             field = value
-            btn_add?.setOnClickListener{field?.onTitleButtonClick()}
+            btn_mediaBoxHeader_add?.setOnClickListener{field?.onTitleButtonClick()}
         }
 
     constructor(context: Context) : super(context) {
@@ -33,16 +33,16 @@ class TitleButton : ConstraintLayout {
     }
 
     private fun initAttr(attributeSet: AttributeSet) {
-        val typedArray = context.theme.obtainStyledAttributes(attributeSet, R.styleable.TitleButton, 0, 0)
-        title = typedArray.getString(R.styleable.TitleButton_title) ?: ""
-        buttonText = typedArray.getString(R.styleable.TitleButton_buttonText) ?: ""
+        val typedArray = context.theme.obtainStyledAttributes(attributeSet, R.styleable.MediaBoxHeader, 0, 0)
+        title = typedArray.getString(R.styleable.MediaBoxHeader_title) ?: ""
+        buttonText = typedArray.getString(R.styleable.MediaBoxHeader_buttonText) ?: ""
     }
 
     private fun initView() {
-        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_item_title_button, this)
+        LayoutInflater.from(context).inflate(R.layout.view_media_box_header, this)
 
-        tv_title.text = title
-        btn_add.text = buttonText
+        tv_mediaBoxHeader_title.text = title
+        btn_mediaBoxHeader_add.text = buttonText
     }
 
     interface OnTitleButtonClickListener {

+ 16 - 16
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TextSeekBar.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.common
 
 import android.content.Context
 import android.support.constraint.ConstraintLayout
@@ -6,9 +6,9 @@ import android.util.AttributeSet
 import android.view.LayoutInflater
 import android.widget.SeekBar
 import com.kdanmobile.reader.R
-import kotlinx.android.synthetic.main.view_viewer_edit_item_seekbar.view.*
+import kotlinx.android.synthetic.main.view_media_box_seekbar.view.*
 
-class TextSeekBar : ConstraintLayout {
+class MediaBoxSeekBar : ConstraintLayout {
 
     private var title = ""
     private var unit = ""
@@ -25,7 +25,7 @@ class TextSeekBar : ConstraintLayout {
     var formatter = defaultFormatter
         set(value) {
             field = value
-            tv_seekBarValue?.text = "${formatter.format(currentValue)}$unit"
+            tv_mediaBoxSeekBar_value?.text = "${formatter.format(currentValue)}$unit"
         }
 
     interface SeekBarFormatter {
@@ -35,8 +35,8 @@ class TextSeekBar : ConstraintLayout {
     var currentValue = 0
         set(value) {
             field = Math.max(Math.min(value, maxValue), minValue)
-            tv_seekBarValue?.text = "${formatter.format(currentValue)}$unit"
-            seekBar?.progress = field - minValue
+            tv_mediaBoxSeekBar_value?.text = "${formatter.format(currentValue)}$unit"
+            seekBar_mediaBoxSeekBar?.progress = field - minValue
         }
     var onSeekBarChangeListener: SeekBar.OnSeekBarChangeListener? = null
 
@@ -55,23 +55,23 @@ class TextSeekBar : ConstraintLayout {
     }
 
     private fun initAttr(attributeSet: AttributeSet) {
-        val typedArray = context.theme.obtainStyledAttributes(attributeSet, R.styleable.TextSeekBar, 0, 0)
-        title = typedArray.getString(R.styleable.TextSeekBar_title) ?: ""
-        unit = typedArray.getString(R.styleable.TextSeekBar_unit) ?: ""
-        maxValue = typedArray.getInteger(R.styleable.TextSeekBar_maxValue, 100)
-        minValue = typedArray.getInteger(R.styleable.TextSeekBar_minValue, 0)
+        val typedArray = context.theme.obtainStyledAttributes(attributeSet, R.styleable.MediaBoxSeekBar, 0, 0)
+        title = typedArray.getString(R.styleable.MediaBoxSeekBar_title) ?: ""
+        unit = typedArray.getString(R.styleable.MediaBoxSeekBar_unit) ?: ""
+        maxValue = typedArray.getInteger(R.styleable.MediaBoxSeekBar_maxValue, 100)
+        minValue = typedArray.getInteger(R.styleable.MediaBoxSeekBar_minValue, 0)
         if (maxValue < minValue)
             maxValue = minValue
-        initValue = typedArray.getInteger(R.styleable.TextSeekBar_initValue, 0)
+        initValue = typedArray.getInteger(R.styleable.MediaBoxSeekBar_initValue, 0)
         initValue = Math.max(Math.min(initValue, maxValue), minValue)
     }
 
     private fun initView() {
-        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_item_seekbar, this)
+        LayoutInflater.from(context).inflate(R.layout.view_media_box_seekbar, this)
 
-        tv_seekBarTitle.text = title
-        seekBar.max = maxValue - minValue
-        seekBar.setOnSeekBarChangeListener(object: SeekBar.OnSeekBarChangeListener {
+        tv_mediaBoxSeekBar_title.text = title
+        seekBar_mediaBoxSeekBar.max = maxValue - minValue
+        seekBar_mediaBoxSeekBar.setOnSeekBarChangeListener(object: SeekBar.OnSeekBarChangeListener {
             override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
                 currentValue = progress + minValue
                 onSeekBarChangeListener?.onProgressChanged(seekBar, currentValue, fromUser)

+ 6 - 4
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/ShapeTabView.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.shape
 
 import android.content.Context
 import android.graphics.Color
@@ -12,13 +12,15 @@ import android.view.ViewGroup
 import com.kdanmobile.kmpdfkit.globaldata.AnnotConfig
 import com.kdanmobile.reader.R
 import com.kdanmobile.reader.screen.data.ShapeAttribute
+import com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxHeader
+import com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxSeekBar
 import kotlinx.android.synthetic.main.view_viewer_edit_item_shape_border.view.*
 import kotlinx.android.synthetic.main.view_viewer_edit_item_shape_fill.view.*
 import kotlinx.android.synthetic.main.view_viewer_edit_tab_shape.view.*
 
 class ShapeTabView : ConstraintLayout {
 
-    var onTitleButtonClickListener: TitleButton.OnTitleButtonClickListener? = null
+    var onMediaBoxHeaderClickListener: MediaBoxHeader.OnTitleButtonClickListener? = null
         set(value) {
             field = value
             titleButton_shape?.onTitleButtonClickListener = field
@@ -103,13 +105,13 @@ class ShapeTabView : ConstraintLayout {
             }
             val view = layoutInflater.inflate(resourceId, container, false)
             if (position == 0) {
-                view.seekBar_shapeBorder_opacity.formatter = object : TextSeekBar.SeekBarFormatter {
+                view.seekBar_shapeBorder_opacity.formatter = object : MediaBoxSeekBar.SeekBarFormatter {
                     override fun format(value: Int): String {
                         return Math.round(value / 2.55).toInt().toString()
                     }
                 }
             } else {
-                view.seekBar_shapeFill_opacity.formatter = object : TextSeekBar.SeekBarFormatter {
+                view.seekBar_shapeFill_opacity.formatter = object : MediaBoxSeekBar.SeekBarFormatter {
                     override fun format(value: Int): String {
                         return Math.round(value / 2.55).toInt().toString()
                     }

+ 1 - 1
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/OnSignatureAddListener.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.signature
 
 interface OnSignatureAddListener {
     fun onSignatureAdd(path: String)

+ 1 - 1
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/OnSignatureClickListener.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.signature
 
 interface OnSignatureClickListener {
     fun onSignatureClick(path: String)

+ 1 - 1
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/OnSignatureRemoveListener.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.signature
 
 interface OnSignatureRemoveListener {
     fun onSignatureRemove(path: String)

+ 1 - 2
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/SignatureAdapter.kt

@@ -1,9 +1,8 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.signature
 
 import android.content.Context
 import android.graphics.Bitmap
 import android.graphics.BitmapFactory
-import android.graphics.Color
 import android.graphics.Matrix
 import android.support.v4.util.LruCache
 import android.support.v7.widget.RecyclerView

+ 2 - 2
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/SignatureRecyclerViewItemDecoration.kt

@@ -1,8 +1,8 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.signature
 
 import android.graphics.Rect
-import android.view.View
 import android.support.v7.widget.RecyclerView
+import android.view.View
 
 
 class SignatureRecyclerViewItemDecoration(private val space: Int, private val additionalPadding: Int) : RecyclerView.ItemDecoration() {

+ 6 - 6
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/SignatureTabView.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.signature
 
 import android.content.Context
 import android.content.Intent
@@ -9,18 +9,18 @@ import android.view.LayoutInflater
 import android.view.View
 import com.kdanmobile.reader.Config
 import com.kdanmobile.reader.R
-import com.kdanmobile.reader.screen.SignatureActivity
 import com.kdanmobile.reader.screen.data.SignatureAttribute
+import com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxHeader
+import com.kdanmobile.reader.screen.signature.SignatureActivity
+import com.kdanmobile.reader.utils.DensityUtil
 import kotlinx.android.synthetic.main.view_viewer_edit_tab_signature.view.*
 import java.io.File
 import java.util.*
-import android.support.v7.widget.DividerItemDecoration
-import com.kdanmobile.reader.utils.DensityUtil
 
 
 class SignatureTabView : ConstraintLayout {
 
-    var onTitleButtonClickListener: TitleButton.OnTitleButtonClickListener? = null
+    var onMediaBoxHeaderClickListener: MediaBoxHeader.OnTitleButtonClickListener? = null
 
     private lateinit var signaturePaths: ArrayList<String>
     private lateinit var selectedSignaturePath: String
@@ -48,7 +48,7 @@ class SignatureTabView : ConstraintLayout {
         adapter.setOnSignatureClickListener(object : OnSignatureClickListener {
             override fun onSignatureClick(path: String) {
                 selectedSignaturePath = path
-                onTitleButtonClickListener?.onTitleButtonClick()
+                onMediaBoxHeaderClickListener?.onTitleButtonClick()
             }
         })
         adapter.setOnSignatureRemoveListener(object : OnSignatureRemoveListener {

+ 1 - 1
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/CustomStampAdapter.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.stamp
 
 import android.content.Context
 import android.support.v7.widget.RecyclerView

+ 1 - 1
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/CustomStampType.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.stamp
 
 import com.kdanmobile.kmpdfkit.annotation.stamp.StampConfig
 import com.kdanmobile.kmpdfkit.annotation.stamp.view.KMPDFStampTextView

+ 1 - 1
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/OnStampClickListener.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.stamp
 
 interface OnStampClickListener {
     fun onStampClick(index: Int)

+ 3 - 2
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/StampTabView.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.stamp
 
 import android.content.Context
 import android.graphics.Rect
@@ -15,6 +15,7 @@ import com.kdanmobile.kmpdfkit.annotation.stamp.TextStampConfig
 import com.kdanmobile.kmpdfkit.annotation.stamp.view.KMPDFStampTextView
 import com.kdanmobile.reader.R
 import com.kdanmobile.reader.screen.data.StampAttribute
+import com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxHeader
 import kotlinx.android.synthetic.main.view_viewer_edit_item_stamp_custom.view.*
 import kotlinx.android.synthetic.main.view_viewer_edit_item_stamp_standard.view.*
 import kotlinx.android.synthetic.main.view_viewer_edit_tab_stamp.view.*
@@ -26,7 +27,7 @@ class StampTabView : ConstraintLayout {
     private var selectedCustomStampIndex = 0
     private var selectedStandardStampIndex = 0
 
-    var onTitleButtonClickListener: TitleButton.OnTitleButtonClickListener? = null
+    var onMediaBoxHeaderClickListener: MediaBoxHeader.OnTitleButtonClickListener? = null
         set(value) {
             field = value
             titleButton_stamp?.onTitleButtonClickListener = field

+ 1 - 1
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/StandardStampAdapter.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.stamp
 
 import android.content.Context
 import android.support.v7.widget.RecyclerView

+ 1 - 1
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TextAttrView.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.textbox
 
 import android.content.Context
 import android.graphics.PorterDuff

+ 3 - 2
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TextBoxTabView.kt

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.reader.mediabox.textbox
 
 import android.content.Context
 import android.graphics.Typeface
@@ -8,12 +8,13 @@ import android.view.LayoutInflater
 import android.widget.SeekBar
 import com.kdanmobile.reader.R
 import com.kdanmobile.reader.screen.data.TextBoxAttribute
+import com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxHeader
 import com.kdanmobile.reader.screen.view.ColorSelectView
 import kotlinx.android.synthetic.main.view_viewer_edit_tab_text_box.view.*
 
 class TextBoxTabView : ConstraintLayout {
 
-    var onTitleButtonClickListener: TitleButton.OnTitleButtonClickListener? = null
+    var onMediaBoxHeaderClickListener: MediaBoxHeader.OnTitleButtonClickListener? = null
         set(value) {
             field = value
             titleButton_textBox?.onTitleButtonClickListener = field

+ 6 - 7
reader/src/main/java/com/kdanmobile/reader/screen/SignatureActivity.kt

@@ -1,18 +1,17 @@
-package com.kdanmobile.reader.screen
+package com.kdanmobile.reader.screen.signature
 
-import android.support.v7.app.AppCompatActivity
+import android.graphics.Bitmap
 import android.os.Bundle
+import android.support.v4.content.ContextCompat
+import android.support.v7.app.AppCompatActivity
 import android.view.MenuItem
 import android.view.View
 import android.widget.SeekBar
+import com.kdanmobile.reader.Config
 import com.kdanmobile.reader.R
+import com.kdanmobile.reader.screen.reader.mediabox.signature.OnSignatureAddListener
 import com.kdanmobile.reader.screen.view.ColorSelectView
-import com.kdanmobile.reader.screen.view.edit.SignatureDrawView
 import kotlinx.android.synthetic.main.activity_view_signature_create.*
-import android.graphics.Bitmap
-import android.support.v4.content.ContextCompat
-import com.kdanmobile.reader.Config
-import com.kdanmobile.reader.screen.view.edit.OnSignatureAddListener
 import java.io.File
 import java.io.FileOutputStream
 import java.io.IOException

+ 4 - 5
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/SignatureDrawView.kt

@@ -1,16 +1,15 @@
-package com.kdanmobile.reader.screen.view.edit
+package com.kdanmobile.reader.screen.signature
 
 import android.content.Context
 import android.graphics.Bitmap
 import android.graphics.Canvas
 import android.graphics.Paint
-import android.graphics.Path
-import android.util.AttributeSet
-import android.view.View
 import android.graphics.Paint.Cap
+import android.graphics.Path
 import android.support.v4.content.ContextCompat
+import android.util.AttributeSet
 import android.view.MotionEvent
-
+import android.view.View
 
 
 class SignatureDrawView : View {

BIN
reader/src/main/res/drawable-hdpi/ic_bookmark.png


BIN
reader/src/main/res/drawable-hdpi/ic_bookmark_border.png


BIN
reader/src/main/res/drawable-hdpi/ic_pagelist_bookmk_h.png


BIN
reader/src/main/res/drawable-hdpi/ic_pagelist_bookmk_nor.png


BIN
reader/src/main/res/drawable-hdpi/ic_pagelist_outline_h.png


BIN
reader/src/main/res/drawable-hdpi/ic_pagelist_outline_nor.png


BIN
reader/src/main/res/drawable-hdpi/ic_pagelist_search_h.png


BIN
reader/src/main/res/drawable-hdpi/ic_pagelist_search_nor.png


BIN
reader/src/main/res/drawable-hdpi/ic_pagelist_thumbnail_h.png


BIN
reader/src/main/res/drawable-hdpi/ic_pagelist_thumbnail_nor.png


BIN
reader/src/main/res/drawable-xhdpi/ic_bookmark.png


BIN
reader/src/main/res/drawable-xhdpi/ic_bookmark_border.png


BIN
reader/src/main/res/drawable-xhdpi/ic_pagelist_bookmk_h.png


BIN
reader/src/main/res/drawable-xhdpi/ic_pagelist_bookmk_nor.png


BIN
reader/src/main/res/drawable-xhdpi/ic_pagelist_outline_h.png


BIN
reader/src/main/res/drawable-xhdpi/ic_pagelist_outline_nor.png


BIN
reader/src/main/res/drawable-xhdpi/ic_pagelist_search_h.png


BIN
reader/src/main/res/drawable-xhdpi/ic_pagelist_search_nor.png


BIN
reader/src/main/res/drawable-xhdpi/ic_pagelist_thumbnail_h.png


BIN
reader/src/main/res/drawable-xhdpi/ic_pagelist_thumbnail_nor.png


BIN
reader/src/main/res/drawable-xxhdpi/ic_bookmark.png


BIN
reader/src/main/res/drawable-xxhdpi/ic_bookmark_border.png


+ 1 - 1
reader/src/main/res/drawable-xhdpi/bg_reader_tool_bar_left.xml

@@ -35,7 +35,7 @@
                 android:right="2dp"
                 android:bottom="2dp"
                 />
-            <solid android:color="#dff5f5f5" />
+            <solid android:color="@color/reader_left_toolbar_bg" />
             <corners
                 android:topRightRadius="4dp"
                 android:bottomRightRadius="4dp"

+ 16 - 0
reader/src/main/res/drawable/bg_reader_tool_bar_left_expand.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape android:shape="rectangle">
+            <solid android:color="@color/reader_left_toolbar_bg" />
+        </shape>
+    </item>
+    <item android:right="-1dp" >
+        <shape>
+            <solid android:color="@android:color/transparent" />
+            <stroke
+                android:width="2dp"
+                android:color="#0E000000" />
+        </shape>
+    </item>
+</layer-list>

+ 1 - 1
reader/src/main/res/drawable/bg_reader_tool_bar_right.xml

@@ -35,7 +35,7 @@
                 android:left="2dp"
                 android:bottom="2dp"
                 />
-            <solid android:color="#dff5f5f5" />
+            <solid android:color="@color/reader_right_toolbar_bg" />
             <corners
                 android:topLeftRadius="4dp"
                 android:bottomLeftRadius="4dp"

+ 12 - 0
reader/src/main/res/drawable/ic_bookmark_border.xml

@@ -0,0 +1,12 @@
+<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="M17,3L7,3C5.9,3 5.01,3.9 5.01,5L5,21L12,18L19,21L19,5C19,3.9 18.1,3 17,3ZM17,18L12,15.82L7,18L7,5L17,5L17,18Z"
+      android:strokeWidth="1"
+      android:fillColor="#BC2D29"
+      android:fillType="evenOdd"
+      android:strokeColor="#00000000"/>
+</vector>

+ 12 - 0
reader/src/main/res/drawable/ic_bookmark_fill.xml

@@ -0,0 +1,12 @@
+<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="M17,3L7,3C5.9,3 5.01,3.9 5.01,5L5,21L12,18L19,21L19,5C19,3.9 18.1,3 17,3Z"
+      android:strokeWidth="1"
+      android:fillColor="#BC2D29"
+      android:fillType="evenOdd"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_bookmarks.xml

@@ -0,0 +1,13 @@
+<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,18L21,19L21,3C21,1.9 20.1,1 19,1L8.99,1C7.89,1 7,1.9 7,3L17,3C18.1,3 19,3.9 19,5L19,18ZM15,5L5,5C3.9,5 3,5.9 3,7L3,23L10,20L17,23L17,7C17,5.9 16.1,5 15,5Z"
+      android:strokeWidth="1"
+      android:fillColor="#000000"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_bookmarks_selected.xml

@@ -0,0 +1,13 @@
+<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,18L21,19L21,3C21,1.9 20.1,1 19,1L8.99,1C7.89,1 7,1.9 7,3L17,3C18.1,3 19,3.9 19,5L19,18ZM15,5L5,5C3.9,5 3,5.9 3,7L3,23L10,20L17,23L17,7C17,5.9 16.1,5 15,5Z"
+      android:strokeWidth="1"
+      android:fillColor="#0077fd"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_outline.xml

@@ -0,0 +1,13 @@
+<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="M3,13L5,13L5,11L3,11L3,13ZM3,17L5,17L5,15L3,15L3,17ZM3,9L5,9L5,7L3,7L3,9ZM7,13L21,13L21,11L7,11L7,13ZM7,17L21,17L21,15L7,15L7,17ZM7,7L7,9L21,9L21,7L7,7Z"
+      android:strokeWidth="1"
+      android:fillColor="#000000"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_outline_selected.xml

@@ -0,0 +1,13 @@
+<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="M3,13L5,13L5,11L3,11L3,13ZM3,17L5,17L5,15L3,15L3,17ZM3,9L5,9L5,7L3,7L3,9ZM7,13L21,13L21,11L7,11L7,13ZM7,17L21,17L21,15L7,15L7,17ZM7,7L7,9L21,9L21,7L7,7Z"
+      android:strokeWidth="1"
+      android:fillColor="#0077fd"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_search.xml

@@ -0,0 +1,13 @@
+<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.5,14L14.71,14L14.43,13.73C15.41,12.59 16,11.11 16,9.5C16,5.91 13.09,3 9.5,3C5.91,3 3,5.91 3,9.5C3,13.09 5.91,16 9.5,16C11.11,16 12.59,15.41 13.73,14.43L14,14.71L14,15.5L19,20.49L20.49,19L15.5,14ZM9.5,14C7.01,14 5,11.99 5,9.5C5,7.01 7.01,5 9.5,5C11.99,5 14,7.01 14,9.5C14,11.99 11.99,14 9.5,14Z"
+      android:strokeWidth="1"
+      android:fillColor="#000000"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_search_selected.xml

@@ -0,0 +1,13 @@
+<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.5,14L14.71,14L14.43,13.73C15.41,12.59 16,11.11 16,9.5C16,5.91 13.09,3 9.5,3C5.91,3 3,5.91 3,9.5C3,13.09 5.91,16 9.5,16C11.11,16 12.59,15.41 13.73,14.43L14,14.71L14,15.5L19,20.49L20.49,19L15.5,14ZM9.5,14C7.01,14 5,11.99 5,9.5C5,7.01 7.01,5 9.5,5C11.99,5 14,7.01 14,9.5C14,11.99 11.99,14 9.5,14Z"
+      android:strokeWidth="1"
+      android:fillColor="#0077fd"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_thumbnails.xml

@@ -0,0 +1,13 @@
+<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="M3,5L1,5L1,21C1,22.1 1.9,23 3,23L19,23L19,21L3,21L3,5ZM21,1L7,1C5.9,1 5,1.9 5,3L5,17C5,18.1 5.9,19 7,19L21,19C22.1,19 23,18.1 23,17L23,3C23,1.9 22.1,1 21,1ZM21,17L7,17L7,3L21,3L21,17Z"
+      android:strokeWidth="1"
+      android:fillColor="#000000"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_thumbnails_selected.xml

@@ -0,0 +1,13 @@
+<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="M3,5L1,5L1,21C1,22.1 1.9,23 3,23L19,23L19,21L3,21L3,5ZM21,1L7,1C5.9,1 5,1.9 5,3L5,17C5,18.1 5.9,19 7,19L21,19C22.1,19 23,18.1 23,17L23,3C23,1.9 22.1,1 21,1ZM21,17L7,17L7,3L21,3L21,17Z"
+      android:strokeWidth="1"
+      android:fillColor="#0077fd"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 27 - 7
reader/src/main/res/layout/activity_reader.xml

@@ -18,7 +18,7 @@
         android:layout_height="0dp" />
     <android.support.v7.widget.Toolbar
         android:id="@+id/toolbar_readerActivity"
-        android:background="@color/reader_toolbar_bg"
+        android:background="@color/reader_top_toolbar_bg"
         app:navigationIcon="@drawable/selector_arrow_back_black_blue_24dp"
         android:elevation="4dp"
         android:minHeight="?attr/actionBarSize"
@@ -58,7 +58,7 @@
                 app:layout_constraintLeft_toLeftOf="parent"
                 app:layout_constraintTop_toTopOf="parent"
                 app:layout_constraintBottom_toBottomOf="parent"
-                android:background="@drawable/bg_reader_tool_bar_left"
+                android:background="@drawable/bg_reader_tool_bar_left_expand"
                 android:orientation="vertical"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content" />
@@ -76,25 +76,25 @@
                     android:id="@+id/iv_readerActivity_thumbnail"
                     android:onClick="onClick"
                     style="@style/ReaderLeftRightToolbarIImageButton"
-                    android:src="@drawable/ic_pagelist_thumbnail_nor" />
+                    android:src="@drawable/ic_left_toolbar_thumbnails" />
                 <View style="@style/ReaderLeftToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_bookmark"
                     android:onClick="onClick"
                     style="@style/ReaderLeftRightToolbarIImageButton"
-                    android:src="@drawable/ic_pagelist_bookmk_nor" />
+                    android:src="@drawable/ic_left_toolbar_bookmarks" />
                 <View style="@style/ReaderLeftToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_outline"
                     android:onClick="onClick"
                     style="@style/ReaderLeftRightToolbarIImageButton"
-                    android:src="@drawable/ic_pagelist_outline_nor" />
+                    android:src="@drawable/ic_left_toolbar_outline" />
                 <View style="@style/ReaderLeftToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_search"
                     android:onClick="onClick"
                     style="@style/ReaderLeftRightToolbarIImageButton"
-                    android:src="@drawable/ic_pagelist_search_nor" />
+                    android:src="@drawable/ic_left_toolbar_search" />
             </LinearLayout>
         </android.support.constraint.ConstraintLayout>
     </com.kdanmobile.reader.view.HorizontalView>
@@ -249,10 +249,20 @@
         app:layout_constraintBottom_toBottomOf="parent"
         android:layout_width="0dp"
         android:layout_height="wrap_content">
+        <View
+            android:id="@+id/view_readerActivity_border"
+            android:background="#1e000000"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent"
+            android:layout_width="0dp"
+            android:layout_height="1dp" />
         <android.support.v7.widget.AppCompatImageButton
             android:id="@+id/ib_readerActivity_bottomToolbarPrevious"
             style="@style/ReaderBottomToolbarImageButton"
             android:src="@drawable/ic_prev"
+            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintLeft_toLeftOf="parent"
             app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarShare"
             app:layout_constraintHorizontal_chainStyle="spread"
@@ -261,6 +271,8 @@
             android:id="@+id/ib_readerActivity_bottomToolbarShare"
             style="@style/ReaderBottomToolbarImageButton"
             android:src="@drawable/ic_share"
+            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarPrevious"
             app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarKdanCloud"
             />
@@ -268,6 +280,8 @@
             android:id="@+id/ib_readerActivity_bottomToolbarKdanCloud"
             style="@style/ReaderBottomToolbarImageButton"
             android:src="@drawable/ic_kdancloud"
+            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarShare"
             app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarViewAll"
             />
@@ -275,6 +289,8 @@
             android:id="@+id/ib_readerActivity_bottomToolbarViewAll"
             style="@style/ReaderBottomToolbarImageButton"
             android:src="@drawable/ic_viewall"
+            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarKdanCloud"
             app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarMediaBox"
             />
@@ -282,6 +298,8 @@
             android:id="@+id/ib_readerActivity_bottomToolbarMediaBox"
             style="@style/ReaderBottomToolbarImageButton"
             android:src="@drawable/ic_work"
+            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarViewAll"
             app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarNext"
             />
@@ -289,12 +307,14 @@
             android:id="@+id/ib_readerActivity_bottomToolbarNext"
             style="@style/ReaderBottomToolbarImageButton"
             android:src="@drawable/ic_next"
+            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarMediaBox"
             app:layout_constraintRight_toRightOf="parent"
             />
     </android.support.constraint.ConstraintLayout>
 
-    <com.kdanmobile.reader.screen.view.ViewerEditView
+    <com.kdanmobile.reader.screen.reader.mediabox.MediaBoxView
         android:id="@+id/viewerEditView"
         android:layout_width="match_parent"
         android:layout_height="match_parent" />

+ 2 - 2
reader/src/main/res/layout/activity_view_signature_create.xml

@@ -49,7 +49,7 @@
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent" />
 
-    <com.kdanmobile.reader.screen.view.edit.SignatureDrawView
+    <com.kdanmobile.reader.screen.signature.SignatureDrawView
         android:id="@+id/drawView"
         android:layout_width="match_parent"
         android:layout_height="0dp"
@@ -89,7 +89,7 @@
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toLeftOf="@+id/guideline" />
 
-    <com.kdanmobile.reader.screen.view.edit.TextSeekBar
+    <com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxSeekBar
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_signature"

+ 9 - 9
reader/src/main/res/layout/view_viewer_edit.xml

@@ -8,7 +8,7 @@
 
     <android.support.constraint.ConstraintLayout
         style="@style/MediaBoxStyle"
-        android:id="@+id/view_viewEdit_content"
+        android:id="@+id/view_mediaBox_dialog"
         tools:visibility="visible"
         tools:background="#AA00CC"
         android:visibility="invisible"
@@ -19,29 +19,29 @@
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent">
 
-        <com.kdanmobile.reader.screen.view.ViewerEditTabView
-            android:id="@+id/viewerEdit_tab"
+        <com.kdanmobile.reader.screen.reader.mediabox.MediaBoxTabView
+            android:id="@+id/mediaBoxTabView_mediaBox_tab"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="4dp"
             android:layout_marginStart="4dp"
             app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="@id/view_viewerEdit_divider"
+            app:layout_constraintRight_toRightOf="@id/view_mediaBox_divider"
             app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintTop_toTopOf="parent" />
 
         <View
-            android:id="@+id/view_viewerEdit_divider"
+            android:id="@+id/view_mediaBox_divider"
             android:background="#1e000000"
-            app:layout_constraintLeft_toRightOf="@+id/viewerEdit_tab"
-            app:layout_constraintRight_toLeftOf="@id/viewEdit_layout_tab_content"
+            app:layout_constraintLeft_toRightOf="@+id/mediaBoxTabView_mediaBox_tab"
+            app:layout_constraintRight_toLeftOf="@id/viewGroup_mediaBox_pageContainer"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintBottom_toBottomOf="parent"
             android:layout_width="1dp"
             android:layout_height="0dp" />
 
         <android.support.constraint.ConstraintLayout
-            android:id="@+id/viewEdit_layout_tab_content"
+            android:id="@+id/viewGroup_mediaBox_pageContainer"
             android:layout_width="0dp"
             android:layout_height="0dp"
             android:layout_marginEnd="8dp"
@@ -49,7 +49,7 @@
             android:layout_marginTop="12dp"
             android:background="@android:color/darker_gray"
             app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toRightOf="@+id/view_viewerEdit_divider"
+            app:layout_constraintLeft_toRightOf="@+id/view_mediaBox_divider"
             app:layout_constraintRight_toRightOf="parent"
             app:layout_constraintTop_toTopOf="parent" />
 

+ 2 - 2
reader/src/main/res/layout/view_viewer_edit_item_title_button.xml

@@ -8,7 +8,7 @@
     tools:parentTag="android.support.constraint.ConstraintLayout">
 
     <TextView
-        android:id="@+id/tv_title"
+        android:id="@+id/tv_mediaBoxHeader_title"
         style="@style/Base.TextAppearance.Widget.AppCompat.Toolbar.Subtitle"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
@@ -21,7 +21,7 @@
         app:layout_constraintLeft_toLeftOf="parent" />
 
     <Button
-        android:id="@+id/btn_add"
+        android:id="@+id/btn_mediaBoxHeader_add"
         android:layout_width="wrap_content"
         android:layout_height="32dp"
         android:layout_marginEnd="16dp"

+ 9 - 9
reader/src/main/res/layout/view_viewer_edit_item_seekbar.xml

@@ -8,7 +8,7 @@
     tools:parentTag="android.support.constraint.ConstraintLayout">
 
     <TextView
-        android:id="@+id/tv_seekBarTitle"
+        android:id="@+id/tv_mediaBoxSeekBar_title"
         style="@style/Base.TextAppearance.Widget.AppCompat.Toolbar.Subtitle"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
@@ -18,12 +18,12 @@
         android:textColor="#de000000"
         android:text="Size"
         android:textSize="12sp"
-        app:layout_constraintBottom_toTopOf="@+id/seekBar"
+        app:layout_constraintBottom_toTopOf="@+id/seekBar_mediaBoxSeekBar"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 
     <SeekBar
-        android:id="@+id/seekBar"
+        android:id="@+id/seekBar_mediaBoxSeekBar"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginLeft="16dp"
@@ -34,11 +34,11 @@
         android:thumbTint="#0077fd"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toLeftOf="@+id/tv_seekBarValue"
-        app:layout_constraintTop_toBottomOf="@+id/tv_seekBarTitle" />
+        app:layout_constraintRight_toLeftOf="@+id/tv_mediaBoxSeekBar_value"
+        app:layout_constraintTop_toBottomOf="@+id/tv_mediaBoxSeekBar_title" />
 
     <TextView
-        android:id="@+id/tv_seekBarValue"
+        android:id="@+id/tv_mediaBoxSeekBar_value"
         android:layout_width="36dp"
         android:layout_height="wrap_content"
         android:gravity="end"
@@ -47,9 +47,9 @@
         android:textColor="#61000000"
         android:text="24pt"
         android:textSize="12sp"
-        app:layout_constraintBottom_toBottomOf="@+id/seekBar"
-        app:layout_constraintLeft_toRightOf="@+id/seekBar"
+        app:layout_constraintBottom_toBottomOf="@+id/seekBar_mediaBoxSeekBar"
+        app:layout_constraintLeft_toRightOf="@+id/seekBar_mediaBoxSeekBar"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/seekBar" />
+        app:layout_constraintTop_toTopOf="@+id/seekBar_mediaBoxSeekBar" />
 
 </merge>

+ 11 - 9
reader/src/main/res/layout/view_viewer_edit_tab.xml

@@ -5,46 +5,48 @@
     android:layout_height="match_parent">
 
     <ImageButton
-        android:id="@+id/viewerEdit_tab_textBox"
+        android:id="@+id/ib_mediaBoxTab_textBox"
         android:layout_width="48dp"
         android:layout_height="48dp"
         android:background="@null"
         android:src="@drawable/ic_textbox" />
 
     <ImageButton
-        android:id="@+id/viewerEdit_tab_signature"
+        android:id="@+id/ib_mediaBoxTab_signature"
         android:layout_width="48dp"
         android:layout_height="48dp"
         android:layout_marginTop="8dp"
         android:background="@null"
         android:src="@drawable/ic_signature"
-        app:layout_constraintTop_toBottomOf="@+id/viewerEdit_tab_textBox" />
+        app:layout_constraintTop_toBottomOf="@+id/ib_mediaBoxTab_textBox" />
 
     <ImageButton
-        android:id="@+id/viewerEdit_tab_stamp"
+        android:id="@+id/ib_mediaBoxTab_stamp"
         android:layout_width="48dp"
         android:layout_height="48dp"
         android:layout_marginTop="8dp"
         android:background="@null"
         android:src="@drawable/ic_stamp"
-        app:layout_constraintTop_toBottomOf="@id/viewerEdit_tab_signature" />
+        app:layout_constraintTop_toBottomOf="@id/ib_mediaBoxTab_signature" />
 
     <ImageButton
-        android:id="@+id/viewerEdit_tab_shape"
+        android:id="@+id/ib_mediaBoxTab_shape"
         android:layout_width="48dp"
         android:layout_height="48dp"
         android:layout_marginTop="8dp"
         android:background="@null"
         android:src="@drawable/ic_shape"
-        app:layout_constraintTop_toBottomOf="@+id/viewerEdit_tab_stamp" />
+        app:layout_constraintTop_toBottomOf="@+id/ib_mediaBoxTab_stamp" />
 
+    <!-- Not support form creating now -->
     <ImageButton
-        android:id="@+id/viewerEdit_tab_form"
+        android:id="@+id/ib_mediaBoxTab_form"
+        android:visibility="gone"
         android:layout_width="48dp"
         android:layout_height="48dp"
         android:layout_marginTop="8dp"
         android:background="@null"
         android:src="@drawable/ic_form"
-        app:layout_constraintTop_toBottomOf="@+id/viewerEdit_tab_shape" />
+        app:layout_constraintTop_toBottomOf="@+id/ib_mediaBoxTab_shape" />
 
 </android.support.constraint.ConstraintLayout>

+ 2 - 2
reader/src/main/res/layout/view_viewer_edit_item_shape_border.xml

@@ -15,7 +15,7 @@
         app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintBottom_toTopOf="@+id/seekBar_shapeBorder_opacity" />
 
-    <com.kdanmobile.reader.screen.view.edit.TextSeekBar
+    <com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxSeekBar
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_shapeBorder_opacity"
@@ -30,7 +30,7 @@
         app:layout_constraintTop_toBottomOf="@+id/colorChooser_shapeBorder"
         app:layout_constraintBottom_toTopOf="@+id/seekBar_shapeBorder_thickness" />
 
-    <com.kdanmobile.reader.screen.view.edit.TextSeekBar
+    <com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxSeekBar
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_shapeBorder_thickness"

+ 1 - 1
reader/src/main/res/layout/view_viewer_edit_item_shape_fill.xml

@@ -15,7 +15,7 @@
         app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintBottom_toTopOf="@+id/seekBar_shapeFill_opacity" />
 
-    <com.kdanmobile.reader.screen.view.edit.TextSeekBar
+    <com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxSeekBar
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_shapeFill_opacity"

+ 1 - 1
reader/src/main/res/layout/view_viewer_edit_tab_shape.xml

@@ -7,7 +7,7 @@
     android:focusable="true"
     android:background="#FFFFFFFF">
 
-    <com.kdanmobile.reader.screen.view.edit.TitleButton
+    <com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxHeader
         android:layout_width="match_parent"
         android:layout_height="56dp"
         android:id="@+id/titleButton_shape"

+ 1 - 1
reader/src/main/res/layout/view_viewer_edit_tab_stamp.xml

@@ -7,7 +7,7 @@
     android:focusable="true"
     android:background="#FFFFFFFF">
 
-    <com.kdanmobile.reader.screen.view.edit.TitleButton
+    <com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxHeader
         android:layout_width="match_parent"
         android:layout_height="56dp"
         android:id="@+id/titleButton_stamp"

+ 3 - 3
reader/src/main/res/layout/view_viewer_edit_tab_text_box.xml

@@ -7,7 +7,7 @@
     android:focusable="true"
     android:background="#FFFFFFFF">
 
-    <com.kdanmobile.reader.screen.view.edit.TitleButton
+    <com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxHeader
         android:layout_width="match_parent"
         android:layout_height="56dp"
         android:id="@+id/titleButton_textBox"
@@ -47,7 +47,7 @@
             app:layout_constraintBottom_toBottomOf="parent" />
     </android.support.constraint.ConstraintLayout>
 
-    <com.kdanmobile.reader.screen.view.edit.TextAttrView
+    <com.kdanmobile.reader.screen.reader.mediabox.textbox.TextAttrView
         android:layout_width="match_parent"
         android:layout_height="48dp"
         android:id="@+id/textAttrView_textBox"
@@ -68,7 +68,7 @@
         app:layout_constraintTop_toBottomOf="@+id/textAttrView_textBox"
         app:layout_constraintBottom_toTopOf="@+id/seekBar_textBox_textSize" />
 
-    <com.kdanmobile.reader.screen.view.edit.TextSeekBar
+    <com.kdanmobile.reader.screen.reader.mediabox.common.MediaBoxSeekBar
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_textBox_textSize"

+ 2 - 2
reader/src/main/res/values/attrs.xml

@@ -8,7 +8,7 @@
 
     <attr name="title" format="string" />
 
-    <declare-styleable name="TextSeekBar">
+    <declare-styleable name="MediaBoxSeekBar">
         <attr name="title" />
         <attr name="unit" format="string" />
         <attr name="maxValue" format="integer" />
@@ -16,7 +16,7 @@
         <attr name="initValue" format="integer" />
     </declare-styleable>
 
-    <declare-styleable name="TitleButton">
+    <declare-styleable name="MediaBoxHeader">
         <attr name="title" />
         <attr name="buttonText" format="string" />
     </declare-styleable>

+ 4 - 2
reader/src/main/res/values/colors.xml

@@ -5,13 +5,15 @@
     <color name="black_38">#61000000</color>
     <color name="picton_blue">#30AFFD</color>
 
-    <color name="reader_toolbar_bg">#D0FFFFFF</color>
+    <color name="reader_top_toolbar_bg">#FFFFFF</color>
     <color name="reader_bottom_toolbar_bg">#FFFFFF</color>
+    <color name="reader_left_toolbar_bg">#FFFFFF</color>
+    <color name="reader_right_toolbar_bg">#FFFFFF</color>
     <color name="reader_media_box_bg">#FFFFFF</color>
     <color name="reader_toolbar_title_color">#E2000000</color>
     <color name="reader_bottom_toolbar_bottom_color_normal">#FFFFFF</color>
     <color name="reader_bottom_toolbar_bottom_color_press">@color/picton_blue</color>
-    <color name="reader_right_toolbar_selected_bg">#6633B5E5</color>
+    <color name="reader_right_toolbar_selected_bg">#1E000000</color>
 
     <color name="reader_annotation_color_1">#000000</color>
     <color name="reader_annotation_color_2">#296dd2</color>