Bläddra i källkod

Merge branch 'renameViewerEdit'

cooperku_kdanmobile 5 år sedan
förälder
incheckning
bab86ea518
21 ändrade filer med 26 tillägg och 28 borttagningar
  1. 2 2
      reader/src/main/java/com/kdanmobile/reader/ReaderActivity.kt
  2. 6 6
      reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/shape/ShapeTabView.kt
  3. 2 2
      reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/signature/SignatureAdapter.kt
  4. 2 2
      reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/signature/SignatureTabView.kt
  5. 2 2
      reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/stamp/CustomStampAdapter.kt
  6. 6 6
      reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/stamp/StampTabView.kt
  7. 2 2
      reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/textbox/TextAttrView.kt
  8. 2 3
      reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/textbox/TextBoxStyleView.kt
  9. 2 3
      reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/textbox/TextBoxTabView.kt
  10. 0 0
      reader/src/main/res/layout/view_media_box_item_shape_border.xml
  11. 0 0
      reader/src/main/res/layout/view_media_box_item_shape_fill.xml
  12. 0 0
      reader/src/main/res/layout/view_media_box_item_signature.xml
  13. 0 0
      reader/src/main/res/layout/view_media_box_item_stamp_custom.xml
  14. 0 0
      reader/src/main/res/layout/view_media_box_item_stamp_custom_viewholder.xml
  15. 0 0
      reader/src/main/res/layout/view_media_box_item_stamp_standard.xml
  16. 0 0
      reader/src/main/res/layout/view_media_box_item_text_attr.xml
  17. 0 0
      reader/src/main/res/layout/view_media_box_tab_shape.xml
  18. 0 0
      reader/src/main/res/layout/view_media_box_tab_signature.xml
  19. 0 0
      reader/src/main/res/layout/view_media_box_tab_stamp.xml
  20. 0 0
      reader/src/main/res/layout/view_media_box_tab_text_box.xml
  21. 0 0
      reader/src/main/res/layout/view_media_box_tab_text_box_style.xml

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

@@ -94,7 +94,7 @@ abstract class ReaderActivity : AppCompatActivity() {
         setupLeftToolbar()
         setupRightSideToolbar()
         setupBottomToolbar()
-        setupViewerEditView()
+        setupMediaBoxView()
 
         val factory = ReaderViewModelFactory()
         viewModel = ViewModelProviders.of(this, factory).get(ReaderViewModel::class.java)
@@ -498,7 +498,7 @@ abstract class ReaderActivity : AppCompatActivity() {
         ib_readerActivity_bottomToolbarMediaBox.setOnClickListener { mediaBoxView.show() }
     }
 
-    private fun setupViewerEditView() {
+    private fun setupMediaBoxView() {
         mediaBoxView.apply {
             onShowListener = Runnable { onMediaBoxShown() }
             onDismissListener = Runnable { onMediaBoxDismissed() }

+ 6 - 6
reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/shape/ShapeTabView.kt

@@ -14,9 +14,9 @@ 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.*
+import kotlinx.android.synthetic.main.view_media_box_item_shape_border.view.*
+import kotlinx.android.synthetic.main.view_media_box_item_shape_fill.view.*
+import kotlinx.android.synthetic.main.view_media_box_tab_shape.view.*
 
 class ShapeTabView : ConstraintLayout {
 
@@ -63,7 +63,7 @@ class ShapeTabView : ConstraintLayout {
     }
 
     private fun initView() {
-        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_tab_shape, this)
+        LayoutInflater.from(context).inflate(R.layout.view_media_box_tab_shape, this)
 
         btn_circle.setOnClickListener { _ ->
             shapeType = AnnotConfig.ShapeAnnotationType.CIRCLE
@@ -100,8 +100,8 @@ class ShapeTabView : ConstraintLayout {
 
         override fun instantiateItem(container: ViewGroup, position: Int): Any {
             val resourceId = when (position == 0) {
-                true -> R.layout.view_viewer_edit_item_shape_border
-                false -> R.layout.view_viewer_edit_item_shape_fill
+                true -> R.layout.view_media_box_item_shape_border
+                false -> R.layout.view_media_box_item_shape_fill
             }
             val view = layoutInflater.inflate(resourceId, container, false)
             if (position == 0) {

+ 2 - 2
reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/signature/SignatureAdapter.kt

@@ -15,7 +15,7 @@ import io.reactivex.Observable
 import io.reactivex.android.schedulers.AndroidSchedulers
 import io.reactivex.disposables.Disposable
 import io.reactivex.schedulers.Schedulers
-import kotlinx.android.synthetic.main.view_viewer_edit_item_signature.view.*
+import kotlinx.android.synthetic.main.view_media_box_item_signature.view.*
 
 class SignatureAdapter(private val context: Context, private var signaturePaths: ArrayList<String>): RecyclerView.Adapter<SignatureViewHolder>() {
 
@@ -48,7 +48,7 @@ class SignatureAdapter(private val context: Context, private var signaturePaths:
     }
 
     override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SignatureViewHolder {
-        val view = LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_item_signature, null)
+        val view = LayoutInflater.from(context).inflate(R.layout.view_media_box_item_signature, null)
         return SignatureViewHolder(view)
     }
 

+ 2 - 2
reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/signature/SignatureTabView.kt

@@ -13,7 +13,7 @@ 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 kotlinx.android.synthetic.main.view_media_box_tab_signature.view.*
 import java.io.File
 import java.util.*
 
@@ -38,7 +38,7 @@ class SignatureTabView : ConstraintLayout {
     }
 
     private fun initView() {
-        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_tab_signature, this)
+        LayoutInflater.from(context).inflate(R.layout.view_media_box_tab_signature, this)
 
         updateSignaturePaths()
         updateSignatureMessage()

+ 2 - 2
reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/stamp/CustomStampAdapter.kt

@@ -7,7 +7,7 @@ import android.view.View
 import android.view.ViewGroup
 import android.widget.ImageView
 import com.kdanmobile.reader.R
-import kotlinx.android.synthetic.main.view_viewer_edit_item_stamp_custom_viewholder.view.*
+import kotlinx.android.synthetic.main.view_media_box_item_stamp_custom_viewholder.view.*
 
 class CustomStampAdapter(private val context: Context, private val stampTypes: Array<CustomStampType>): RecyclerView.Adapter<CustomStampViewHolder>() {
 
@@ -48,7 +48,7 @@ class CustomStampAdapter(private val context: Context, private val stampTypes: A
     }
 
     override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CustomStampViewHolder {
-        val view = LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_item_stamp_custom_viewholder, null)
+        val view = LayoutInflater.from(context).inflate(R.layout.view_media_box_item_stamp_custom_viewholder, null)
 //            val view = ImageView(context)
         return CustomStampViewHolder(view)
     }

+ 6 - 6
reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/stamp/StampTabView.kt

@@ -16,9 +16,9 @@ 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.*
+import kotlinx.android.synthetic.main.view_media_box_item_stamp_custom.view.*
+import kotlinx.android.synthetic.main.view_media_box_item_stamp_standard.view.*
+import kotlinx.android.synthetic.main.view_media_box_tab_stamp.view.*
 import java.text.SimpleDateFormat
 import java.util.*
 
@@ -46,7 +46,7 @@ class StampTabView : ConstraintLayout {
     }
 
     private fun initView() {
-        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_tab_stamp, this)
+        LayoutInflater.from(context).inflate(R.layout.view_media_box_tab_stamp, this)
 
         viewPager.adapter = StampViewPagerAdapter(arrayListOf(resources.getString(R.string.mediaBox_stamp_tabCustom), resources.getString(R.string.mediaBox_stamp_tabStandard)))
         tabLayout.setupWithViewPager(viewPager)
@@ -92,7 +92,7 @@ class StampTabView : ConstraintLayout {
         override fun instantiateItem(container: ViewGroup, position: Int): Any {
             val view = when (position) {
                 0 -> {
-                    val customStampView = layoutInflater.inflate(R.layout.view_viewer_edit_item_stamp_custom, container, false)
+                    val customStampView = layoutInflater.inflate(R.layout.view_media_box_item_stamp_custom, container, false)
 
                     val date = Date()
                     customStampView.cb_date.text = SimpleDateFormat("yyyy/MM/dd").format(date)
@@ -111,7 +111,7 @@ class StampTabView : ConstraintLayout {
                     customStampView
                 }
                 else -> {
-                    val standardStampView = layoutInflater.inflate(R.layout.view_viewer_edit_item_stamp_standard, container, false)
+                    val standardStampView = layoutInflater.inflate(R.layout.view_media_box_item_stamp_standard, container, false)
                     val recyclerView = standardStampView.recyclerView_shapeStandard
                     recyclerView.layoutManager = GridLayoutManager(context, 3)
                     val adapter = StandardStampAdapter(context, STANDARD_STAMP_RES.values())

+ 2 - 2
reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/textbox/TextAttrView.kt

@@ -8,7 +8,7 @@ import android.util.AttributeSet
 import android.view.Gravity
 import android.view.LayoutInflater
 import com.kdanmobile.reader.R
-import kotlinx.android.synthetic.main.view_viewer_edit_item_text_attr.view.*
+import kotlinx.android.synthetic.main.view_media_box_item_text_attr.view.*
 
 class TextAttrView : ConstraintLayout {
 
@@ -73,7 +73,7 @@ class TextAttrView : ConstraintLayout {
     }
 
     private fun initView() {
-        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_item_text_attr, this)
+        LayoutInflater.from(context).inflate(R.layout.view_media_box_item_text_attr, this)
 
         btn_text_bold.setOnClickListener {
             isTextBold = !isTextBold

+ 2 - 3
reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/textbox/TextBoxStyleView.kt

@@ -4,10 +4,9 @@ import android.content.Context
 import android.graphics.Typeface
 import android.util.AttributeSet
 import android.view.LayoutInflater
-import android.widget.SeekBar
 import com.kdanmobile.reader.R
 import com.kdanmobile.reader.screen.view.ColorSelectView
-import kotlinx.android.synthetic.main.view_viewer_edit_tab_text_box_style.view.*
+import kotlinx.android.synthetic.main.view_media_box_tab_text_box_style.view.*
 
 class TextBoxStyleView : TextBoxTabView {
 
@@ -18,7 +17,7 @@ class TextBoxStyleView : TextBoxTabView {
     constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle)
 
     override fun initView() {
-        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_tab_text_box_style, this)
+        LayoutInflater.from(context).inflate(R.layout.view_media_box_tab_text_box_style, this)
 
         textAttrView_textBox.onTextAttrClickListener = object : TextAttrView.OnTextAttrClickListener {
 

+ 2 - 3
reader/src/main/java/com/kdanmobile/reader/screen/reader/mediabox/textbox/TextBoxTabView.kt

@@ -5,12 +5,11 @@ import android.graphics.Typeface
 import android.support.constraint.ConstraintLayout
 import android.util.AttributeSet
 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.*
+import kotlinx.android.synthetic.main.view_media_box_tab_text_box.view.*
 
 open class TextBoxTabView : ConstraintLayout {
 
@@ -33,7 +32,7 @@ open class TextBoxTabView : ConstraintLayout {
     }
 
     protected open fun initView() {
-        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_tab_text_box, this)
+        LayoutInflater.from(context).inflate(R.layout.view_media_box_tab_text_box, this)
 
         textAttrView_textBox.onTextAttrClickListener = object : TextAttrView.OnTextAttrClickListener {
 

reader/src/main/res/layout/view_viewer_edit_item_shape_border.xml → reader/src/main/res/layout/view_media_box_item_shape_border.xml


reader/src/main/res/layout/view_viewer_edit_item_shape_fill.xml → reader/src/main/res/layout/view_media_box_item_shape_fill.xml


reader/src/main/res/layout/view_viewer_edit_item_signature.xml → reader/src/main/res/layout/view_media_box_item_signature.xml


reader/src/main/res/layout/view_viewer_edit_item_stamp_custom.xml → reader/src/main/res/layout/view_media_box_item_stamp_custom.xml


reader/src/main/res/layout/view_viewer_edit_item_stamp_custom_viewholder.xml → reader/src/main/res/layout/view_media_box_item_stamp_custom_viewholder.xml


reader/src/main/res/layout/view_viewer_edit_item_stamp_standard.xml → reader/src/main/res/layout/view_media_box_item_stamp_standard.xml


reader/src/main/res/layout/view_viewer_edit_item_text_attr.xml → reader/src/main/res/layout/view_media_box_item_text_attr.xml


reader/src/main/res/layout/view_viewer_edit_tab_shape.xml → reader/src/main/res/layout/view_media_box_tab_shape.xml


reader/src/main/res/layout/view_viewer_edit_tab_signature.xml → reader/src/main/res/layout/view_media_box_tab_signature.xml


reader/src/main/res/layout/view_viewer_edit_tab_stamp.xml → reader/src/main/res/layout/view_media_box_tab_stamp.xml


reader/src/main/res/layout/view_viewer_edit_tab_text_box.xml → reader/src/main/res/layout/view_media_box_tab_text_box.xml


reader/src/main/res/layout/view_viewer_edit_tab_text_box_style.xml → reader/src/main/res/layout/view_media_box_tab_text_box_style.xml