Ver código fonte

Add text used in MediaBox into strings.xml

cooperku_kdanmobile 5 anos atrás
pai
commit
bea699ea4a

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

@@ -82,7 +82,7 @@ class ShapeTabView : ConstraintLayout {
         }
         shapeType = AnnotConfig.ShapeAnnotationType.CIRCLE
 
-        viewPager.adapter = ViewPagerAdapter(context, arrayListOf("Border", "Fill"))
+        viewPager.adapter = ViewPagerAdapter(context, arrayListOf(resources.getString(R.string.mediaBox_shape_tabBorder), resources.getString(R.string.mediaBox_shape_tabFill)))
         tabLayout.setupWithViewPager(viewPager)
     }
 

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

@@ -48,7 +48,7 @@ class StampTabView : ConstraintLayout {
     private fun initView() {
         LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_tab_stamp, this)
 
-        viewPager.adapter = StampViewPagerAdapter(arrayListOf("Custom", "Standard"))
+        viewPager.adapter = StampViewPagerAdapter(arrayListOf(resources.getString(R.string.mediaBox_stamp_tabCustom), resources.getString(R.string.mediaBox_stamp_tabStandard)))
         tabLayout.setupWithViewPager(viewPager)
     }
 

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

@@ -10,7 +10,7 @@
         android:layout_width="match_parent"
         android:layout_height="?attr/actionBarSize"
         android:background="#0077fd"
-        app:title="Create signature"
+        app:title="@string/mediaBox_signature_createSignature"
         app:titleTextColor="@android:color/white"
         app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintLeft_toLeftOf="parent"
@@ -26,7 +26,7 @@
         android:paddingEnd="16dp"
         android:textColor="@android:color/white"
         android:textSize="14sp"
-        android:text="SAVE"
+        android:text="@string/mediaBox_signature_btnSave"
         android:gravity="center"
         app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintRight_toRightOf="parent" />
@@ -43,7 +43,7 @@
         android:gravity="center"
         android:textColor="#61000000"
         android:textSize="16sp"
-        android:text="Write here"
+        android:text="@string/mediaBox_signature_writeHere"
         app:layout_constraintTop_toBottomOf="@id/toolbar_signature"
         app:layout_constraintBottom_toTopOf="@id/btn_clear_signature"
         app:layout_constraintLeft_toLeftOf="parent"
@@ -121,7 +121,7 @@
         android:textColor="#0077fd"
         android:textSize="14sp"
         android:textStyle="bold"
-        android:text="CLEAR"
+        android:text="@string/mediaBox_signature_btnClear"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toLeftOf="parent" />
 

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

@@ -20,8 +20,8 @@
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_shapeBorder_opacity"
         android:layout_marginTop="8dp"
-        app:title="Opacity"
-        app:unit="%"
+        app:title="@string/mediaBox_shape_titleSeekBarOpacity"
+        app:unit="@string/mediaBox_shape_unitSeekBarOpacity"
         app:maxValue="255"
         app:minValue="0"
         app:initValue="255"
@@ -34,8 +34,8 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_shapeBorder_thickness"
-        app:title="Thickness"
-        app:unit="px"
+        app:title="@string/mediaBox_shape_titleSeekBarThickness"
+        app:unit="@string/mediaBox_shape_unitSeekBarThickness"
         app:maxValue="24"
         app:minValue="0"
         app:initValue="3"

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

@@ -20,8 +20,8 @@
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_shapeFill_opacity"
         android:layout_marginTop="8dp"
-        app:title="Opacity"
-        app:unit="%"
+        app:title="@string/mediaBox_shape_titleSeekBarOpacity"
+        app:unit="@string/mediaBox_shape_unitSeekBarOpacity"
         app:maxValue="255"
         app:minValue="0"
         app:initValue="0"

+ 1 - 3
reader/src/main/res/layout/view_viewer_edit_item_stamp_custom.xml

@@ -29,7 +29,7 @@
             android:gravity="start"
             android:textColor="#f5a623"
             android:textSize="16sp"
-            android:hint="Enter Text"
+            android:hint="@string/mediaBox_stamp_hintEditText"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintBottom_toBottomOf="parent" />
     </android.support.constraint.ConstraintLayout>
@@ -42,7 +42,6 @@
         android:layout_marginBottom="20dp"
         android:gravity="center_vertical"
         android:textSize="14sp"
-        android:text="2018/12/31"
         app:layout_constraintBottom_toTopOf="@+id/recyclerView_shapeCustom"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toLeftOf="@+id/cb_time"
@@ -55,7 +54,6 @@
         android:layout_marginBottom="12dp"
         android:gravity="center_vertical"
         android:textSize="14sp"
-        android:text="10:59:00 am"
         app:layout_constraintBottom_toTopOf="@+id/recyclerView_shapeCustom"
         app:layout_constraintLeft_toRightOf="@+id/cb_date"
         app:layout_constraintRight_toRightOf="parent"

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

@@ -11,8 +11,8 @@
         android:layout_width="match_parent"
         android:layout_height="56dp"
         android:id="@+id/titleButton_shape"
-        app:title="Shape"
-        app:buttonText="ADD"
+        app:title="@string/mediaBox_shape_title"
+        app:buttonText="@string/mediaBox_shape_btnAdd"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="parent"

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

@@ -18,7 +18,7 @@
         android:gravity="center_vertical"
         android:textColor="#de000000"
         android:textSize="14sp"
-        android:text="Signature Library" />
+        android:text="@string/mediaBox_signature_title" />
 
     <TextView
         android:id="@+id/tv_noSignature"
@@ -32,7 +32,7 @@
         android:gravity="center_vertical"
         android:textColor="#61000000"
         android:textSize="16sp"
-        android:text="No signature created"
+        android:text="@string/mediaBox_signature_noSignatureCreated"
         app:layout_constraintTop_toBottomOf="@id/tv_title_signature"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent" />

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

@@ -11,8 +11,8 @@
         android:layout_width="match_parent"
         android:layout_height="56dp"
         android:id="@+id/titleButton_stamp"
-        app:title="Stamp"
-        app:buttonText="ADD"
+        app:title="@string/mediaBox_stamp_title"
+        app:buttonText="@string/mediaBox_stamp_btnAdd"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="parent"

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

@@ -11,15 +11,15 @@
         android:layout_width="match_parent"
         android:layout_height="56dp"
         android:id="@+id/titleButton_textBox"
-        app:title="Text"
-        app:buttonText="ADD"
+        app:title="@string/mediaBox_textBox_title"
+        app:buttonText="@string/mediaBox_textBox_btnAdd"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="parent"
-        app:layout_constraintBottom_toTopOf="@+id/editTextView_textBox" />
+        app:layout_constraintBottom_toTopOf="@+id/layout_textBox" />
 
     <android.support.constraint.ConstraintLayout
-        android:id="@+id/editTextView_textBox"
+        android:id="@+id/layout_textBox"
         android:layout_width="match_parent"
         android:layout_height="64dp"
         android:orientation="vertical"
@@ -42,7 +42,7 @@
             android:gravity="start"
             android:textColor="#f5a623"
             android:textSize="24sp"
-            android:text="Sample Text"
+            android:text="@string/mediaBox_textBox_simpleText"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintBottom_toBottomOf="parent" />
     </android.support.constraint.ConstraintLayout>
@@ -53,7 +53,7 @@
         android:id="@+id/textAttrView_textBox"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/editTextView_textBox"
+        app:layout_constraintTop_toBottomOf="@+id/layout_textBox"
         app:layout_constraintBottom_toTopOf="@+id/colorChooser_textBox" />
 
     <com.kdanmobile.reader.screen.view.ColorSelectView
@@ -73,8 +73,8 @@
         android:layout_height="wrap_content"
         android:id="@+id/seekBar_textBox_textSize"
         android:layout_marginTop="16dp"
-        app:title="Size"
-        app:unit="pt"
+        app:title="@string/mediaBox_textBox_titleSeekBarSize"
+        app:unit="@string/mediaBox_textBox_unitSeekBarSize"
         app:maxValue="96"
         app:minValue="8"
         app:initValue="24"

+ 30 - 0
reader/src/main/res/values/strings.xml

@@ -47,4 +47,34 @@
     <string name="viewer_setting_toolbar_display_setting">Toolbar Display Setting</string>
     <string name="viewer_setting_toolbar_display_setting_comment">Display Comment Tool</string>
     <string name="viewer_setting_toolbar_display_setting_bota">Display BOTA tool</string>
+
+    <string name="contextMenu_textbox_style">Style</string>
+
+    <!--MediaBox-->
+    <string name="mediaBox_textBox_title">Text</string>
+    <string name="mediaBox_textBox_btnAdd">ADD</string>
+    <string name="mediaBox_textBox_simpleText">Sample Text</string>
+    <string name="mediaBox_textBox_titleSeekBarSize">Size</string>
+    <string name="mediaBox_textBox_unitSeekBarSize">pt</string>
+    <string name="mediaBox_textBoxModify_title">Style</string>
+    <string name="mediaBox_textBoxModify_btnApply">APPLY</string>
+    <string name="mediaBox_signature_title">Signature Library</string>
+    <string name="mediaBox_signature_noSignatureCreated">No signature created</string>
+    <string name="mediaBox_signature_createSignature">Create signature</string>
+    <string name="mediaBox_signature_btnSave">SAVE</string>
+    <string name="mediaBox_signature_writeHere">Write here</string>
+    <string name="mediaBox_signature_btnClear">CLEAR</string>
+    <string name="mediaBox_stamp_title">Stamp</string>
+    <string name="mediaBox_stamp_btnAdd">ADD</string>
+    <string name="mediaBox_stamp_hintEditText">Enter Text</string>
+    <string name="mediaBox_stamp_tabCustom">Custom</string>
+    <string name="mediaBox_stamp_tabStandard">Standard</string>
+    <string name="mediaBox_shape_title">Shape</string>
+    <string name="mediaBox_shape_btnAdd">ADD</string>
+    <string name="mediaBox_shape_tabBorder">Border</string>
+    <string name="mediaBox_shape_tabFill">Fill</string>
+    <string name="mediaBox_shape_titleSeekBarOpacity">Opacity</string>
+    <string name="mediaBox_shape_unitSeekBarOpacity">%</string>
+    <string name="mediaBox_shape_titleSeekBarThickness">Thickness</string>
+    <string name="mediaBox_shape_unitSeekBarThickness">px</string>
 </resources>