diff --git a/app/build.gradle b/app/build.gradle index de3b7d9b..58b5050c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,7 +11,7 @@ android { applicationId "com.brouken.player" minSdkVersion 21 targetSdkVersion 34 - versionCode 151 + versionCode 152 versionName "0.${versionCode}" archivesBaseName = "Just.Player.v${versionName}" } diff --git a/app/src/main/java/com/brouken/player/PlayerActivity.java b/app/src/main/java/com/brouken/player/PlayerActivity.java index f617edc6..910fbc7b 100644 --- a/app/src/main/java/com/brouken/player/PlayerActivity.java +++ b/app/src/main/java/com/brouken/player/PlayerActivity.java @@ -1133,6 +1133,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { } } else if (requestCode == REQUEST_SETTINGS) { mPrefs.loadUserPreferences(); + updateSubtitleStyle(this); } else { super.onActivityResult(requestCode, resultCode, data); } @@ -1945,7 +1946,8 @@ void updateSubtitleStyle(final Context context) { userStyle.hasWindowColor() ? userStyleCompat.windowColor : Color.TRANSPARENT, userStyle.hasEdgeType() ? userStyleCompat.edgeType : CaptionStyleCompat.EDGE_TYPE_OUTLINE, userStyle.hasEdgeColor() ? userStyleCompat.edgeColor : Color.BLACK, - userStyleCompat.typeface != null ? userStyleCompat.typeface : Typeface.DEFAULT_BOLD); + Typeface.create(userStyleCompat.typeface != null ? userStyleCompat.typeface : Typeface.DEFAULT, + mPrefs.subtitleStyleBold ? Typeface.BOLD : Typeface.NORMAL)); subtitleView.setStyle(captionStyle); subtitleView.setApplyEmbeddedStyles(mPrefs.subtitleStyleEmbedded); subtitleView.setBottomPaddingFraction(SubtitleView.DEFAULT_BOTTOM_PADDING_FRACTION * 2f / 3f); diff --git a/app/src/main/java/com/brouken/player/Prefs.java b/app/src/main/java/com/brouken/player/Prefs.java index d900956c..54a3f344 100644 --- a/app/src/main/java/com/brouken/player/Prefs.java +++ b/app/src/main/java/com/brouken/player/Prefs.java @@ -46,6 +46,7 @@ class Prefs { private static final String PREF_KEY_MAP_DV7 = "mapDV7ToHevc"; private static final String PREF_KEY_LANGUAGE_AUDIO = "languageAudio"; private static final String PREF_KEY_SUBTITLE_STYLE_EMBEDDED = "subtitleStyleEmbedded"; + private static final String PREF_KEY_SUBTITLE_STYLE_BOLD = "subtitleStyleBold"; public static final String TRACK_DEFAULT = "default"; public static final String TRACK_DEVICE = "device"; @@ -79,6 +80,7 @@ class Prefs { public boolean mapDV7ToHevc = false; public String languageAudio = TRACK_DEVICE; public boolean subtitleStyleEmbedded = true; + public boolean subtitleStyleBold = false; private LinkedHashMap positions; @@ -127,6 +129,7 @@ public void loadUserPreferences() { mapDV7ToHevc = mSharedPreferences.getBoolean(PREF_KEY_MAP_DV7, mapDV7ToHevc); languageAudio = mSharedPreferences.getString(PREF_KEY_LANGUAGE_AUDIO, languageAudio); subtitleStyleEmbedded = mSharedPreferences.getBoolean(PREF_KEY_SUBTITLE_STYLE_EMBEDDED, subtitleStyleEmbedded); + subtitleStyleBold = mSharedPreferences.getBoolean(PREF_KEY_SUBTITLE_STYLE_BOLD, subtitleStyleBold); } public void updateMedia(final Context context, final Uri uri, final String type) { diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 74f55e6b..d838b197 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -54,4 +54,7 @@ Styly v titulcích Aplikovat styly definované v titulcích Neaplikovat styly definované v titulcích + Tučné písmo + Použít tučný styl písma + Použít výchozí styl písma \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4fbf2a37..1b0e1329 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -55,4 +55,7 @@ Embedded styles Apply embedded subtitle styles Do not apply embedded subtitle styles + Bold style + Use bold typeface as regular + Use default regular typeface \ No newline at end of file diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml index 8a66ac84..73cd1b33 100644 --- a/app/src/main/res/xml/root_preferences.xml +++ b/app/src/main/res/xml/root_preferences.xml @@ -55,6 +55,13 @@ android:summaryOff="@string/pref_subtitle_style_embedded_off" app:title="@string/pref_subtitle_style_embedded" /> + + diff --git a/build.gradle b/build.gradle index 02284d99..96bb259f 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.1.1' + classpath 'com.android.tools.build:gradle:8.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files