[Android] TV: String resources for ext devices dialog

Geoffrey Métais git at videolan.org
Wed Dec 5 11:37:09 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec  5 11:36:47 2018 +0100| [b9067087ca24c537d77a12ace6d6679ee0b9f955] | committer: Geoffrey Métais

TV: String resources for ext devices dialog

> https://code.videolan.org/videolan/vlc-android/commit/b9067087ca24c537d77a12ace6d6679ee0b9f955
---

 vlc-android/res/layout/dialog_ext_device.xml                 | 4 ++--
 vlc-android/res/values/strings.xml                           | 2 ++
 vlc-android/src/org/videolan/vlc/gui/dialogs/DeviceDialog.kt | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/vlc-android/res/layout/dialog_ext_device.xml b/vlc-android/res/layout/dialog_ext_device.xml
index 7569802df..c83ad55b5 100644
--- a/vlc-android/res/layout/dialog_ext_device.xml
+++ b/vlc-android/res/layout/dialog_ext_device.xml
@@ -19,7 +19,7 @@
             android:layout_marginTop="8dp"
             android:layout_marginEnd="8dp"
             android:gravity="center_horizontal"
-            android:text="New device detected, do you want to handle it with VLC?"
+            android:text="@string/device_dialog_message"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toTopOf="parent" />
@@ -32,7 +32,7 @@
             android:layout_marginTop="8dp"
             android:layout_marginEnd="8dp"
             android:onClick="@{handler::browse}"
-            android:text="@string/ok"
+            android:text="@string/browse_folder"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintHorizontal_bias="0.5"
             app:layout_constraintStart_toEndOf="@+id/ext_device_scan"
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 52f16fb11..75a7ff1b5 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -660,4 +660,6 @@
     <string name="ctx_player_subs_track">Subtitles track</string>
     <string name="ctx_player_tracks_title">Media tracks</string>
     <string name="ctx_pip_title">Pop-Up player</string>
+    <string name="device_dialog_title">External device inserted</string>
+    <string name="device_dialog_message">New device detected, do you want to handle it with VLC?</string>
 </resources>
diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/DeviceDialog.kt b/vlc-android/src/org/videolan/vlc/gui/dialogs/DeviceDialog.kt
index 4bd830f1c..d3b741418 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/DeviceDialog.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/DeviceDialog.kt
@@ -6,6 +6,7 @@ import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
 import androidx.fragment.app.DialogFragment
+import org.videolan.vlc.R
 import org.videolan.vlc.StartActivity
 import org.videolan.vlc.databinding.DialogExtDeviceBinding
 import org.videolan.vlc.gui.helpers.MedialibraryUtils
@@ -25,7 +26,7 @@ class DeviceDialog : DialogFragment() {
     }
 
     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
-        dialog.setTitle("External device inserted")
+        dialog.setTitle(getString(R.string.device_dialog_title))
         val binding = DialogExtDeviceBinding.inflate(inflater, container, false)
         binding.handler = clickHandler
         if (scan) binding.extDeviceScan.visibility = View.VISIBLE



More information about the Android mailing list