Sfoglia il codice sorgente

Move classes about MediaBox to right package

Wayne 5 anni fa
parent
commit
3845ef5d27
30 ha cambiato i file con 65 aggiunte e 60 eliminazioni
  1. 1 1
      reader/src/main/AndroidManifest.xml
  2. 11 11
      reader/src/main/java/com/kdanmobile/reader/ReaderActivity.kt
  3. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/ViewerEditTabView.kt
  4. 6 2
      reader/src/main/java/com/kdanmobile/reader/screen/view/ViewerEditView.kt
  5. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TextSeekBar.kt
  6. 1 1
      reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TitleButton.kt
  7. 3 1
      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. 4 4
      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. 2 1
      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. 2 1
      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. 1 1
      reader/src/main/res/layout/activity_reader.xml
  24. 2 2
      reader/src/main/res/layout/activity_view_signature_create.xml
  25. 1 1
      reader/src/main/res/layout/view_viewer_edit.xml
  26. 2 2
      reader/src/main/res/layout/view_viewer_edit_item_shape_border.xml
  27. 1 1
      reader/src/main/res/layout/view_viewer_edit_item_shape_fill.xml
  28. 1 1
      reader/src/main/res/layout/view_viewer_edit_tab_shape.xml
  29. 1 1
      reader/src/main/res/layout/view_viewer_edit_tab_stamp.xml
  30. 3 3
      reader/src/main/res/layout/view_viewer_edit_tab_text_box.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>

+ 11 - 11
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,21 +20,26 @@ import android.view.View
 import android.widget.EditText
 import android.widget.LinearLayout
 import android.widget.TextView
+import android.widget.Toast
+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.ViewerEditView
+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() {

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

@@ -1,4 +1,4 @@
-package com.kdanmobile.reader.screen.view
+package com.kdanmobile.reader.screen.reader.mediabox
 
 import android.content.Context
 import android.support.constraint.ConstraintLayout

+ 6 - 2
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,7 +12,11 @@ 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 com.kdanmobile.reader.screen.reader.mediabox.common.TitleButton
+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_viewer_edit.view.*
 import kotlinx.android.synthetic.main.view_viewer_edit_tab.view.*
 

+ 1 - 1
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

+ 1 - 1
reader/src/main/java/com/kdanmobile/reader/screen/view/edit/TitleButton.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

+ 3 - 1
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,6 +12,8 @@ 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.TextSeekBar
+import com.kdanmobile.reader.screen.reader.mediabox.common.TitleButton
 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.*

+ 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() {

+ 4 - 4
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,13 +9,13 @@ 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.TitleButton
+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 {

+ 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)

+ 2 - 1
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.TitleButton
 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.*

+ 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

+ 2 - 1
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,6 +8,7 @@ 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.TitleButton
 import com.kdanmobile.reader.screen.view.ColorSelectView
 import kotlinx.android.synthetic.main.view_viewer_edit_tab_text_box.view.*
 

+ 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 {

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

@@ -293,7 +293,7 @@
             />
     </android.support.constraint.ConstraintLayout>
 
-    <com.kdanmobile.reader.screen.view.ViewerEditView
+    <com.kdanmobile.reader.screen.reader.mediabox.ViewerEditView
         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.TextSeekBar
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_signature"

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

@@ -19,7 +19,7 @@
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent">
 
-        <com.kdanmobile.reader.screen.view.ViewerEditTabView
+        <com.kdanmobile.reader.screen.reader.mediabox.ViewerEditTabView
             android:id="@+id/viewerEdit_tab"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"

+ 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.TextSeekBar
         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.TextSeekBar
         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.TextSeekBar
         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.TitleButton
         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.TitleButton
         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.TitleButton
         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.TextSeekBar
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_textBox_textSize"