5 Commits 59aa4b7d43 ... 9377c216b8

Autor SHA1 Mensaje Fecha
  Wayne Huang 9377c216b8 Merge branch '141-removeSignatureSnackBar' into 'master' hace 4 años
  Wayne Huang 945851d896 Merge branch '142-fixToolbarInFrontOfMediaBox' into 'master' hace 4 años
  cooperku_kdanmobile eee5d9b0b9 Refactor hace 4 años
  cooperku_kdanmobile aacf9c87c9 Let MediaBoxView be in front of Toolbar hace 4 años
  cooperku_kdanmobile 4e29bab072 Remove Signature SnackBar hace 4 años

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

@@ -1025,7 +1025,6 @@ abstract class ReaderActivity :
                 override fun onClickSignatureAddButton(signatureTabView: SignatureTabView) {
                     dismiss(false)
                     viewModel.setSignatureAttribute(signatureTabView.getSignatureAttribute())
-                    showSnackbar(resources.getString(R.string.reader_mediaBox_snakebar_signature), resources.getString(R.string.reader_mediaBox_snakebar_undo))
                 }
 
                 override fun onClickStampAddButton(stampTabView: StampTabView) {
@@ -1226,7 +1225,7 @@ abstract class ReaderActivity :
     private fun setLeftToolbarContentView(leftToolbarType: ReaderViewModel.LeftToolbarType) {
         if (oldLeftToolbarType != leftToolbarType) {
             linearLayout_readerActivity_leftToolbarContainer.removeAllViews()
-            val view = when (leftToolbarType) {
+            val view: View = when (leftToolbarType) {
                 ReaderViewModel.LeftToolbarType.NONE,
                 ReaderViewModel.LeftToolbarType.THUMBNAIL -> {
                     val thumbnailView = ThumbnailView(this)
@@ -1249,7 +1248,7 @@ abstract class ReaderActivity :
                     searchView
                 }
             }
-            linearLayout_readerActivity_leftToolbarContainer.addView(view as View)
+            linearLayout_readerActivity_leftToolbarContainer.addView(view)
             oldLeftToolbarType = leftToolbarType
         }
     }

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

@@ -57,7 +57,7 @@ class MediaBoxView @JvmOverloads constructor(
         view_mediaBox_dialog.setOnClickListener {}
 
         /** Move media box view to bottom of parent(hide it) **/
-        val size = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)
+        val size = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)
         val v = view_mediaBox_dialog
         v.measure(size, size)
         v.y = v.top + v.measuredHeight.toFloat()
@@ -69,7 +69,7 @@ class MediaBoxView @JvmOverloads constructor(
             viewGroup_mediaBox_pageContainer.removeAllViews()
         }
         val textBoxStyleView = TextBoxStyleView(context)
-        val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
+        val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
         viewGroup_mediaBox_pageContainer.addView(textBoxStyleView, params)
         textBoxStyleView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
             override fun onTitleButtonClick() {
@@ -232,7 +232,7 @@ class MediaBoxView @JvmOverloads constructor(
         val changed = setupContent(view as ImageButton, MediaBoxTabType.TEXT_BOX)
         if (changed) {
             val textBoxTabView = TextBoxTabView(context)
-            val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
+            val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
             viewGroup_mediaBox_pageContainer.addView(textBoxTabView, params)
             textBoxTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
                 override fun onTitleButtonClick() {
@@ -246,7 +246,7 @@ class MediaBoxView @JvmOverloads constructor(
         val changed = setupContent(view as ImageButton, MediaBoxTabType.SIGNATURE)
         if (changed) {
             val signatureTabView = SignatureTabView(context)
-            val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
+            val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
             viewGroup_mediaBox_pageContainer.addView(signatureTabView, params)
             signatureTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
                 override fun onTitleButtonClick() {
@@ -260,7 +260,7 @@ class MediaBoxView @JvmOverloads constructor(
         val changed = setupContent(view as ImageButton, MediaBoxTabType.STAMP)
         if (changed) {
             val stampTabView = StampTabView(context)
-            val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
+            val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
             viewGroup_mediaBox_pageContainer.addView(stampTabView, params)
             stampTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
                 override fun onTitleButtonClick() {
@@ -274,7 +274,7 @@ class MediaBoxView @JvmOverloads constructor(
         val changed = setupContent(view as ImageButton, MediaBoxTabType.SHAPE)
         if (changed) {
             val shapeTabView = ShapeTabView(context)
-            val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
+            val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
             viewGroup_mediaBox_pageContainer.addView(shapeTabView, params)
             shapeTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
                 override fun onTitleButtonClick() {

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

@@ -232,7 +232,9 @@
     <com.kdanmobile.reader.screen.reader.mediabox.MediaBoxView
         android:id="@+id/mediaBoxView"
         android:layout_width="match_parent"
-        android:layout_height="match_parent" />
+        android:layout_height="match_parent"
+        android:translationZ="100dp"
+        tools:ignore="UnusedAttribute" />
 
     <include
         android:id="@+id/view_ink_menu"

+ 0 - 1
src/main/res/values-de/strings.xml

@@ -62,7 +62,6 @@
     <string name="reader_mediaBox_shape_titleSeekBarOpacity">Transparenz</string>
     <string name="reader_mediaBox_shape_titleSeekBarThickness">Dicke</string>
     <string name="reader_mediaBox_snakebar_textBox">Tippen Sie auf eine beliebige Stelle auf der Seite, um fortzufahren.</string>
-    <string name="reader_mediaBox_snakebar_signature">Tippen Sie auf eine beliebige Stelle auf der Seite, um fortzufahren.</string>
     <string name="reader_mediaBox_snakebar_stamp">Tippen Sie auf eine beliebige Stelle auf der Seite, um fortzufahren.</string>
     <string name="reader_mediaBox_snakebar_shape">Tippen Sie auf eine beliebige Stelle auf der Seite, um fortzufahren.</string>
     <string name="reader_mediaBox_snakebar_undo">RÜCKGÄNGIG</string>

+ 0 - 1
src/main/res/values-es/strings.xml

@@ -61,7 +61,6 @@
     <string name="reader_mediaBox_shape_titleSeekBarOpacity">Opacidad</string>
     <string name="reader_mediaBox_shape_titleSeekBarThickness">Espesor</string>
     <string name="reader_mediaBox_snakebar_textBox">Presionar en cualquier parte de la página para continuar.</string>
-    <string name="reader_mediaBox_snakebar_signature">Presionar en cualquier parte de la página para continuar.</string>
     <string name="reader_mediaBox_snakebar_stamp">Presionar en cualquier parte de la página para continuar.</string>
     <string name="reader_mediaBox_snakebar_shape">Presionar en cualquier parte de la página para continuar.</string>
     <string name="reader_mediaBox_snakebar_undo">ANULAR</string>

+ 0 - 1
src/main/res/values-fr/strings.xml

@@ -61,7 +61,6 @@
     <string name="reader_mediaBox_shape_titleSeekBarOpacity">Opacité</string>
     <string name="reader_mediaBox_shape_titleSeekBarThickness">Épaisseur</string>
     <string name="reader_mediaBox_snakebar_textBox">Tapez n\'importe où sur la page pour continuer</string>
-    <string name="reader_mediaBox_snakebar_signature">Tapez n\'importe où sur la page pour continuer</string>
     <string name="reader_mediaBox_snakebar_stamp">Tapez n\'importe où sur la page pour continuer</string>
     <string name="reader_mediaBox_snakebar_shape">Tapez n\'importe où sur la page pour continuer</string>
     <string name="reader_mediaBox_snakebar_undo">ANNULER</string>

+ 0 - 1
src/main/res/values-it/strings.xml

@@ -61,7 +61,6 @@
     <string name="reader_mediaBox_shape_titleSeekBarOpacity">Opacità</string>
     <string name="reader_mediaBox_shape_titleSeekBarThickness">Spessore</string>
     <string name="reader_mediaBox_snakebar_textBox">Tocca sulla pagina per continuare</string>
-    <string name="reader_mediaBox_snakebar_signature">Tocca sulla pagina per continuare</string>
     <string name="reader_mediaBox_snakebar_stamp">Tocca sulla pagina per continuare</string>
     <string name="reader_mediaBox_snakebar_shape">Tocca sulla pagina per continuare</string>
     <string name="reader_mediaBox_snakebar_undo">ANNULLA</string>

+ 0 - 1
src/main/res/values-ja/strings.xml

@@ -60,7 +60,6 @@
     <string name="reader_mediaBox_shape_titleSeekBarOpacity">不透明度</string>
     <string name="reader_mediaBox_shape_titleSeekBarThickness">厚さ</string>
     <string name="reader_mediaBox_snakebar_textBox">続けるには、ページのどこかをタップしてください。</string>
-    <string name="reader_mediaBox_snakebar_signature">続けるには、ページのどこかをタップしてください。</string>
     <string name="reader_mediaBox_snakebar_stamp">続けるには、ページのどこかをタップしてください。</string>
     <string name="reader_mediaBox_snakebar_shape">続けるには、ページのどこかをタップしてください。</string>
     <string name="reader_mediaBox_snakebar_undo">元に戻す</string>

+ 0 - 1
src/main/res/values-ko/strings.xml

@@ -61,7 +61,6 @@
     <string name="reader_mediaBox_shape_titleSeekBarOpacity">불투명도</string>
     <string name="reader_mediaBox_shape_titleSeekBarThickness">굵기</string>
     <string name="reader_mediaBox_snakebar_textBox">계속하려면 페이지의 아무곳이나 누르세요.</string>
-    <string name="reader_mediaBox_snakebar_signature">계속하려면 페이지의 아무곳이나 누르세요.</string>
     <string name="reader_mediaBox_snakebar_stamp">계속하려면 페이지의 아무곳이나 누르세요.</string>
     <string name="reader_mediaBox_snakebar_shape">계속하려면 페이지의 아무곳이나 누르세요.</string>
     <string name="reader_mediaBox_snakebar_undo">실행 취소</string>

+ 0 - 1
src/main/res/values-pt/strings.xml

@@ -61,7 +61,6 @@
     <string name="reader_mediaBox_shape_titleSeekBarOpacity">Opacidade</string>
     <string name="reader_mediaBox_shape_titleSeekBarThickness">Espessura</string>
     <string name="reader_mediaBox_snakebar_textBox">Toque em qualquer lugar da página para continuar.</string>
-    <string name="reader_mediaBox_snakebar_signature">Toque em qualquer lugar da página para continuar.</string>
     <string name="reader_mediaBox_snakebar_stamp">Toque em qualquer lugar da página para continuar.</string>
     <string name="reader_mediaBox_snakebar_shape">Toque em qualquer lugar da página para continuar.</string>
     <string name="reader_mediaBox_snakebar_undo">DESFAZER</string>

+ 0 - 1
src/main/res/values-ru/strings.xml

@@ -61,7 +61,6 @@
     <string name="reader_mediaBox_shape_titleSeekBarOpacity">Непрозрачность</string>
     <string name="reader_mediaBox_shape_titleSeekBarThickness">Толщина</string>
     <string name="reader_mediaBox_snakebar_textBox">Коснитесь в любом месте страницы, чтобы продолжить</string>
-    <string name="reader_mediaBox_snakebar_signature">Коснитесь в любом месте страницы, чтобы продолжить</string>
     <string name="reader_mediaBox_snakebar_stamp">Коснитесь в любом месте страницы, чтобы продолжить</string>
     <string name="reader_mediaBox_snakebar_shape">Коснитесь в любом месте страницы, чтобы продолжить</string>
     <string name="reader_mediaBox_snakebar_undo">ОТКАТ</string>

+ 0 - 1
src/main/res/values-zh-rTW/strings.xml

@@ -62,7 +62,6 @@
     <string name="reader_mediaBox_shape_titleSeekBarOpacity">不透明度</string>
     <string name="reader_mediaBox_shape_titleSeekBarThickness">粗細</string>
     <string name="reader_mediaBox_snakebar_textBox">點擊頁面中任意位置即可插入物件。</string>
-    <string name="reader_mediaBox_snakebar_signature">點擊頁面中任意位置即可插入物件。</string>
     <string name="reader_mediaBox_snakebar_stamp">點擊頁面中任意位置即可插入物件。</string>
     <string name="reader_mediaBox_snakebar_shape">點擊頁面中任意位置即可插入物件。</string>
     <string name="reader_mediaBox_snakebar_undo">取消</string>

+ 0 - 1
src/main/res/values-zh/strings.xml

@@ -62,7 +62,6 @@
     <string name="reader_mediaBox_shape_titleSeekBarOpacity">不透明度</string>
     <string name="reader_mediaBox_shape_titleSeekBarThickness">粗细</string>
     <string name="reader_mediaBox_snakebar_textBox">点击页面中任意位置即可插入物件。</string>
-    <string name="reader_mediaBox_snakebar_signature">点击页面中任意位置即可插入物件。</string>
     <string name="reader_mediaBox_snakebar_stamp">点击页面中任意位置即可插入物件。</string>
     <string name="reader_mediaBox_snakebar_shape">点击页面中任意位置即可插入物件。</string>
     <string name="reader_mediaBox_snakebar_undo">取消</string>

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

@@ -91,7 +91,6 @@
     <string name="reader_mediaBox_shape_unitSeekBarThickness" translatable="false">px</string>
 
     <string name="reader_mediaBox_snakebar_textBox">Tap anywhere on the page to continue.</string>
-    <string name="reader_mediaBox_snakebar_signature">Tap anywhere on the page to continue.</string>
     <string name="reader_mediaBox_snakebar_stamp">Tap anywhere on the page to continue.</string>
     <string name="reader_mediaBox_snakebar_shape">Tap anywhere on the page to continue.</string>
     <string name="reader_mediaBox_snakebar_undo">UNDO</string>