[Android] Fix imports and string format
Geoffrey Métais
git at videolan.org
Mon Nov 25 15:45:02 CET 2019
vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Nov 25 15:44:16 2019 +0100| [a40f71af08ff7611565365b737aebbbb5a577825] | committer: Geoffrey Métais
Fix imports and string format
> https://code.videolan.org/videolan/vlc-android/commit/a40f71af08ff7611565365b737aebbbb5a577825
---
vlc-android/res/values/strings.xml | 2 +-
vlc-android/src/org/videolan/vlc/util/Kextensions.kt | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 35d57716b..e7206408f 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -702,7 +702,7 @@
<string name="popup_force_legacy_title">Use custom Picture-in-Picture popup</string>
<string name="popup_force_legacy_summary">Use custom Picture-in-Picture resizable popup</string>
<string name="device_default">Device default</string>
- <string name="track_number">%d tracks</string>
+ <string name="track_number">%s tracks</string>
<string name="jump_to">Jump to</string>
<string name="show_video_thumbnails_summary">Show video thumbnails in lists</string>
<string name="show_video_thumbnails">Video thumbnails</string>
diff --git a/vlc-android/src/org/videolan/vlc/util/Kextensions.kt b/vlc-android/src/org/videolan/vlc/util/Kextensions.kt
index 6512ecba4..3b9ce130b 100644
--- a/vlc-android/src/org/videolan/vlc/util/Kextensions.kt
+++ b/vlc-android/src/org/videolan/vlc/util/Kextensions.kt
@@ -26,6 +26,7 @@ import org.videolan.medialibrary.interfaces.AbstractMedialibrary
import org.videolan.medialibrary.interfaces.media.AbstractMediaWrapper
import org.videolan.medialibrary.interfaces.media.AbstractMediaWrapper.TYPE_ALL
import org.videolan.medialibrary.media.MediaLibraryItem
+import org.videolan.vlc.R
import org.videolan.vlc.startMedialibrary
import java.io.File
import java.net.URI
@@ -33,8 +34,6 @@ import java.net.URISyntaxException
import java.util.*
import kotlin.coroutines.resume
-
-
//object Settings : SingletonHolder<SharedPreferences, Context>({ PreferenceManager.getDefaultSharedPreferences(it) })
fun String.validateLocation(): Boolean {
@@ -142,7 +141,7 @@ fun asyncTextItem(view: TextView, item: MediaLibraryItem?) {
view.visibility = View.GONE
return
}
- val text = if (item.itemType == MediaLibraryItem.TYPE_PLAYLIST) view.context.getString(R.string.track_number, item.tracksCount) else item.description
+ val text = if (item.itemType == MediaLibraryItem.TYPE_PLAYLIST) view.context.getString(R.string.track_number, item.tracksCount.toString()) else item.description
if (text.isNullOrEmpty()) {
view.visibility = View.GONE
return
More information about the Android
mailing list