[Android] Move more resources to the resource module
Nicolas Pomepuy
git at videolan.org
Thu Mar 19 16:06:23 CET 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Mar 19 14:45:03 2020 +0100| [67fb3f3e767975043c87c6310d6fecbdadf75c6a] | committer: Nicolas Pomepuy
Move more resources to the resource module
> https://code.videolan.org/videolan/vlc-android/commit/67fb3f3e767975043c87c6310d6fecbdadf75c6a
---
application/resources/build.gradle | 7 +++++++
.../flavors/debug/res/drawable/ic_launcher_background.xml | 0
.../flavors/debug/res/drawable/ic_launcher_foreground.xml | 0
.../src/main/java/org/videolan/resources/VLCOptions.kt | 3 +--
.../src/main}/res/drawable-ldrtl/ic_forward_player.xml | 0
.../main}/res/drawable-ldrtl/ic_forward_player_disabled.xml | 0
.../src/main}/res/drawable-ldrtl/ic_next_player.xml | 0
.../src/main}/res/drawable-ldrtl/ic_rewind_player.xml | 0
.../main}/res/drawable-ldrtl/ic_rewind_player_disabled.xml | 0
.../src/main}/res/drawable-nodpi/nav_header_background.png | Bin
.../src/main}/res/drawable-v21/po_seekbar.xml | 0
.../src/main}/res/drawable/ic_forward_player.xml | 0
.../src/main}/res/drawable/ic_forward_player_disabled.xml | 0
.../src/main}/res/drawable/ic_launcher_background.xml | 0
.../src/main}/res/drawable/ic_launcher_foreground.xml | 0
.../src/main}/res/drawable/ic_next_player.xml | 0
.../src/main}/res/drawable/ic_rewind_player.xml | 0
.../src/main}/res/drawable/ic_rewind_player_disabled.xml | 0
.../src/main}/res/drawable/po_seekbar.xml | 0
19 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/application/resources/build.gradle b/application/resources/build.gradle
index b526ae1ab..861a00481 100644
--- a/application/resources/build.gradle
+++ b/application/resources/build.gradle
@@ -34,6 +34,13 @@ android {
}
+ sourceSets.debug {
+ res.srcDirs = ['flavors/debug/res']
+ }
+ sourceSets.dev {
+ res.srcDirs = ['flavors/debug/res']
+ }
+
}
dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
diff --git a/application/vlc-android/flavors/debug/res/drawable/ic_launcher_background.xml b/application/resources/flavors/debug/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from application/vlc-android/flavors/debug/res/drawable/ic_launcher_background.xml
rename to application/resources/flavors/debug/res/drawable/ic_launcher_background.xml
diff --git a/application/vlc-android/flavors/debug/res/drawable/ic_launcher_foreground.xml b/application/resources/flavors/debug/res/drawable/ic_launcher_foreground.xml
similarity index 100%
rename from application/vlc-android/flavors/debug/res/drawable/ic_launcher_foreground.xml
rename to application/resources/flavors/debug/res/drawable/ic_launcher_foreground.xml
diff --git a/application/resources/src/main/java/org/videolan/resources/VLCOptions.kt b/application/resources/src/main/java/org/videolan/resources/VLCOptions.kt
index 9cc48d384..271604545 100644
--- a/application/resources/src/main/java/org/videolan/resources/VLCOptions.kt
+++ b/application/resources/src/main/java/org/videolan/resources/VLCOptions.kt
@@ -33,7 +33,6 @@ import org.videolan.libvlc.util.AndroidUtil
import org.videolan.libvlc.util.HWDecoderUtil
import org.videolan.libvlc.util.VLCUtil
import org.videolan.medialibrary.interfaces.media.MediaWrapper
-import org.videolan.resources.R.*
import org.videolan.tools.Preferences
import org.videolan.tools.Settings
import java.io.File
@@ -66,7 +65,7 @@ object VLCOptions {
val options = ArrayList<String>(50)
- val timeStrechingDefault = context != null && context.resources.getBoolean(bool.time_stretching_default)
+ val timeStrechingDefault = context != null && context.resources.getBoolean(R.bool.time_stretching_default)
val timeStreching = pref.getBoolean("enable_time_stretching_audio", timeStrechingDefault)
val subtitlesEncoding = pref.getString("subtitle_text_encoding", "") ?: ""
val frameSkip = pref.getBoolean("enable_frame_skip", false)
diff --git a/application/vlc-android/res/drawable-ldrtl/ic_forward_player.xml b/application/resources/src/main/res/drawable-ldrtl/ic_forward_player.xml
similarity index 100%
rename from application/vlc-android/res/drawable-ldrtl/ic_forward_player.xml
rename to application/resources/src/main/res/drawable-ldrtl/ic_forward_player.xml
diff --git a/application/vlc-android/res/drawable-ldrtl/ic_forward_player_disabled.xml b/application/resources/src/main/res/drawable-ldrtl/ic_forward_player_disabled.xml
similarity index 100%
rename from application/vlc-android/res/drawable-ldrtl/ic_forward_player_disabled.xml
rename to application/resources/src/main/res/drawable-ldrtl/ic_forward_player_disabled.xml
diff --git a/application/vlc-android/res/drawable-ldrtl/ic_next_player.xml b/application/resources/src/main/res/drawable-ldrtl/ic_next_player.xml
similarity index 100%
rename from application/vlc-android/res/drawable-ldrtl/ic_next_player.xml
rename to application/resources/src/main/res/drawable-ldrtl/ic_next_player.xml
diff --git a/application/vlc-android/res/drawable-ldrtl/ic_rewind_player.xml b/application/resources/src/main/res/drawable-ldrtl/ic_rewind_player.xml
similarity index 100%
rename from application/vlc-android/res/drawable-ldrtl/ic_rewind_player.xml
rename to application/resources/src/main/res/drawable-ldrtl/ic_rewind_player.xml
diff --git a/application/vlc-android/res/drawable-ldrtl/ic_rewind_player_disabled.xml b/application/resources/src/main/res/drawable-ldrtl/ic_rewind_player_disabled.xml
similarity index 100%
rename from application/vlc-android/res/drawable-ldrtl/ic_rewind_player_disabled.xml
rename to application/resources/src/main/res/drawable-ldrtl/ic_rewind_player_disabled.xml
diff --git a/application/vlc-android/res/drawable-nodpi/nav_header_background.png b/application/resources/src/main/res/drawable-nodpi/nav_header_background.png
similarity index 100%
rename from application/vlc-android/res/drawable-nodpi/nav_header_background.png
rename to application/resources/src/main/res/drawable-nodpi/nav_header_background.png
diff --git a/application/vlc-android/res/drawable-v21/po_seekbar.xml b/application/resources/src/main/res/drawable-v21/po_seekbar.xml
similarity index 100%
rename from application/vlc-android/res/drawable-v21/po_seekbar.xml
rename to application/resources/src/main/res/drawable-v21/po_seekbar.xml
diff --git a/application/vlc-android/res/drawable/ic_forward_player.xml b/application/resources/src/main/res/drawable/ic_forward_player.xml
similarity index 100%
rename from application/vlc-android/res/drawable/ic_forward_player.xml
rename to application/resources/src/main/res/drawable/ic_forward_player.xml
diff --git a/application/vlc-android/res/drawable/ic_forward_player_disabled.xml b/application/resources/src/main/res/drawable/ic_forward_player_disabled.xml
similarity index 100%
rename from application/vlc-android/res/drawable/ic_forward_player_disabled.xml
rename to application/resources/src/main/res/drawable/ic_forward_player_disabled.xml
diff --git a/application/vlc-android/res/drawable/ic_launcher_background.xml b/application/resources/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from application/vlc-android/res/drawable/ic_launcher_background.xml
rename to application/resources/src/main/res/drawable/ic_launcher_background.xml
diff --git a/application/vlc-android/res/drawable/ic_launcher_foreground.xml b/application/resources/src/main/res/drawable/ic_launcher_foreground.xml
similarity index 100%
rename from application/vlc-android/res/drawable/ic_launcher_foreground.xml
rename to application/resources/src/main/res/drawable/ic_launcher_foreground.xml
diff --git a/application/vlc-android/res/drawable/ic_next_player.xml b/application/resources/src/main/res/drawable/ic_next_player.xml
similarity index 100%
rename from application/vlc-android/res/drawable/ic_next_player.xml
rename to application/resources/src/main/res/drawable/ic_next_player.xml
diff --git a/application/vlc-android/res/drawable/ic_rewind_player.xml b/application/resources/src/main/res/drawable/ic_rewind_player.xml
similarity index 100%
rename from application/vlc-android/res/drawable/ic_rewind_player.xml
rename to application/resources/src/main/res/drawable/ic_rewind_player.xml
diff --git a/application/vlc-android/res/drawable/ic_rewind_player_disabled.xml b/application/resources/src/main/res/drawable/ic_rewind_player_disabled.xml
similarity index 100%
rename from application/vlc-android/res/drawable/ic_rewind_player_disabled.xml
rename to application/resources/src/main/res/drawable/ic_rewind_player_disabled.xml
diff --git a/application/vlc-android/res/drawable/po_seekbar.xml b/application/resources/src/main/res/drawable/po_seekbar.xml
similarity index 100%
rename from application/vlc-android/res/drawable/po_seekbar.xml
rename to application/resources/src/main/res/drawable/po_seekbar.xml
More information about the Android
mailing list