mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
parent
318ee08366
commit
63d6ea02c0
6 changed files with 241 additions and 211 deletions
|
@ -457,7 +457,6 @@ class HomeFragment : Fragment() {
|
||||||
private fun loadHomePage(successful: Boolean = false) {
|
private fun loadHomePage(successful: Boolean = false) {
|
||||||
val apiName = context?.getKey<String>(USER_SELECTED_HOMEPAGE_API)
|
val apiName = context?.getKey<String>(USER_SELECTED_HOMEPAGE_API)
|
||||||
|
|
||||||
println("LOAD HOMEPAGE $successful $apiName ${homeViewModel.apiName.value}")
|
|
||||||
if (homeViewModel.apiName.value != apiName || apiName == null) {
|
if (homeViewModel.apiName.value != apiName || apiName == null) {
|
||||||
//println("Caught home: " + homeViewModel.apiName.value + " at " + apiName)
|
//println("Caught home: " + homeViewModel.apiName.value + " at " + apiName)
|
||||||
homeViewModel.loadAndCancel(apiName)
|
homeViewModel.loadAndCancel(apiName)
|
||||||
|
|
|
@ -39,6 +39,7 @@ class CustomDecoder : SubtitleDecoder {
|
||||||
private var overrideEncoding: String? = null
|
private var overrideEncoding: String? = null
|
||||||
var regexSubtitlesToRemoveCaptions = false
|
var regexSubtitlesToRemoveCaptions = false
|
||||||
var regexSubtitlesToRemoveBloat = false
|
var regexSubtitlesToRemoveBloat = false
|
||||||
|
var uppercaseSubtitles = false
|
||||||
val bloatRegex =
|
val bloatRegex =
|
||||||
listOf(
|
listOf(
|
||||||
Regex(
|
Regex(
|
||||||
|
@ -193,6 +194,9 @@ class CustomDecoder : SubtitleDecoder {
|
||||||
bloatRegex.forEach { rgx ->
|
bloatRegex.forEach { rgx ->
|
||||||
str = str.replace(rgx, "\n")
|
str = str.replace(rgx, "\n")
|
||||||
}
|
}
|
||||||
|
if (uppercaseSubtitles) {
|
||||||
|
str = str.uppercase()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
inputBuffer.setSubtitleText(str)
|
inputBuffer.setSubtitleText(str)
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.google.android.exoplayer2.util.MimeTypes
|
||||||
import com.lagradost.cloudstream3.SubtitleFile
|
import com.lagradost.cloudstream3.SubtitleFile
|
||||||
import com.lagradost.cloudstream3.ui.player.CustomDecoder.Companion.regexSubtitlesToRemoveBloat
|
import com.lagradost.cloudstream3.ui.player.CustomDecoder.Companion.regexSubtitlesToRemoveBloat
|
||||||
import com.lagradost.cloudstream3.ui.player.CustomDecoder.Companion.regexSubtitlesToRemoveCaptions
|
import com.lagradost.cloudstream3.ui.player.CustomDecoder.Companion.regexSubtitlesToRemoveCaptions
|
||||||
|
import com.lagradost.cloudstream3.ui.player.CustomDecoder.Companion.uppercaseSubtitles
|
||||||
import com.lagradost.cloudstream3.ui.subtitles.SaveCaptionStyle
|
import com.lagradost.cloudstream3.ui.subtitles.SaveCaptionStyle
|
||||||
import com.lagradost.cloudstream3.ui.subtitles.SubtitlesFragment.Companion.fromSaveToStyle
|
import com.lagradost.cloudstream3.ui.subtitles.SubtitlesFragment.Companion.fromSaveToStyle
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.toPx
|
import com.lagradost.cloudstream3.utils.UIHelper.toPx
|
||||||
|
@ -87,6 +88,7 @@ class PlayerSubtitleHelper {
|
||||||
|
|
||||||
fun setSubStyle(style: SaveCaptionStyle) {
|
fun setSubStyle(style: SaveCaptionStyle) {
|
||||||
regexSubtitlesToRemoveBloat = style.removeBloat
|
regexSubtitlesToRemoveBloat = style.removeBloat
|
||||||
|
uppercaseSubtitles = style.upperCase
|
||||||
regexSubtitlesToRemoveCaptions = style.removeCaptions
|
regexSubtitlesToRemoveCaptions = style.removeCaptions
|
||||||
subtitleView?.context?.let { ctx ->
|
subtitleView?.context?.let { ctx ->
|
||||||
subStyle = style
|
subStyle = style
|
||||||
|
|
|
@ -38,6 +38,7 @@ import com.lagradost.cloudstream3.utils.UIHelper.hideSystemUI
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.navigate
|
import com.lagradost.cloudstream3.utils.UIHelper.navigate
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage
|
import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage
|
||||||
import kotlinx.android.synthetic.main.subtitle_settings.*
|
import kotlinx.android.synthetic.main.subtitle_settings.*
|
||||||
|
import kotlinx.android.synthetic.main.toast.view.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
const val SUBTITLE_KEY = "subtitle_settings"
|
const val SUBTITLE_KEY = "subtitle_settings"
|
||||||
|
@ -60,6 +61,8 @@ data class SaveCaptionStyle(
|
||||||
@JsonProperty("fixedTextSize") var fixedTextSize: Float?,
|
@JsonProperty("fixedTextSize") var fixedTextSize: Float?,
|
||||||
@JsonProperty("removeCaptions") var removeCaptions: Boolean = false,
|
@JsonProperty("removeCaptions") var removeCaptions: Boolean = false,
|
||||||
@JsonProperty("removeBloat") var removeBloat: Boolean = true,
|
@JsonProperty("removeBloat") var removeBloat: Boolean = true,
|
||||||
|
/** Apply caps lock to the text **/
|
||||||
|
@JsonProperty("upperCase") var upperCase: Boolean = false,
|
||||||
)
|
)
|
||||||
|
|
||||||
const val DEF_SUBS_ELEVATION = 20
|
const val DEF_SUBS_ELEVATION = 20
|
||||||
|
@ -182,6 +185,19 @@ class SubtitlesFragment : Fragment() {
|
||||||
|
|
||||||
private fun Context.updateState() {
|
private fun Context.updateState() {
|
||||||
subtitle_text?.setStyle(fromSaveToStyle(state))
|
subtitle_text?.setStyle(fromSaveToStyle(state))
|
||||||
|
val text = subtitle_text.context.getString(R.string.subtitles_example_text)
|
||||||
|
val fixedText = if (state.upperCase) text.uppercase() else text
|
||||||
|
subtitle_text?.setCues(
|
||||||
|
listOf(
|
||||||
|
Cue.Builder()
|
||||||
|
.setTextSize(
|
||||||
|
getPixels(TypedValue.COMPLEX_UNIT_SP, 25.0f).toFloat(),
|
||||||
|
Cue.TEXT_SIZE_TYPE_ABSOLUTE
|
||||||
|
)
|
||||||
|
.setText(fixedText)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getColor(id: Int): Int {
|
private fun getColor(id: Int): Int {
|
||||||
|
@ -222,7 +238,6 @@ class SubtitlesFragment : Fragment() {
|
||||||
context?.getExternalFilesDir(null)?.absolutePath.toString() + "/Fonts"
|
context?.getExternalFilesDir(null)?.absolutePath.toString() + "/Fonts"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
context?.fixPaddingStatusbar(subs_root)
|
context?.fixPaddingStatusbar(subs_root)
|
||||||
|
|
||||||
state = getCurrentSavedStyle()
|
state = getCurrentSavedStyle()
|
||||||
|
@ -404,6 +419,12 @@ class SubtitlesFragment : Fragment() {
|
||||||
subtitles_remove_bloat?.setOnCheckedChangeListener { _, b ->
|
subtitles_remove_bloat?.setOnCheckedChangeListener { _, b ->
|
||||||
state.removeBloat = b
|
state.removeBloat = b
|
||||||
}
|
}
|
||||||
|
subtitles_uppercase?.isChecked = state.upperCase
|
||||||
|
subtitles_uppercase?.setOnCheckedChangeListener { _, b ->
|
||||||
|
state.upperCase = b
|
||||||
|
context?.updateState()
|
||||||
|
}
|
||||||
|
|
||||||
subtitles_remove_captions?.isChecked = state.removeCaptions
|
subtitles_remove_captions?.isChecked = state.removeCaptions
|
||||||
subtitles_remove_captions?.setOnCheckedChangeListener { _, b ->
|
subtitles_remove_captions?.setOnCheckedChangeListener { _, b ->
|
||||||
state.removeCaptions = b
|
state.removeCaptions = b
|
||||||
|
@ -418,9 +439,11 @@ class SubtitlesFragment : Fragment() {
|
||||||
|
|
||||||
//Fetch current value from preference
|
//Fetch current value from preference
|
||||||
context?.let { ctx ->
|
context?.let { ctx ->
|
||||||
subtitles_filter_sub_lang?.isChecked = PreferenceManager.getDefaultSharedPreferences(ctx)
|
subtitles_filter_sub_lang?.isChecked =
|
||||||
.getBoolean(getString(R.string.filter_sub_lang_key), false)
|
PreferenceManager.getDefaultSharedPreferences(ctx)
|
||||||
|
.getBoolean(getString(R.string.filter_sub_lang_key), false)
|
||||||
}
|
}
|
||||||
|
|
||||||
subtitles_filter_sub_lang?.setOnCheckedChangeListener { _, b ->
|
subtitles_filter_sub_lang?.setOnCheckedChangeListener { _, b ->
|
||||||
context?.let { ctx ->
|
context?.let { ctx ->
|
||||||
PreferenceManager.getDefaultSharedPreferences(ctx)
|
PreferenceManager.getDefaultSharedPreferences(ctx)
|
||||||
|
@ -553,17 +576,5 @@ class SubtitlesFragment : Fragment() {
|
||||||
it.context.fromSaveToStyle(state)
|
it.context.fromSaveToStyle(state)
|
||||||
activity?.popCurrentPage()
|
activity?.popCurrentPage()
|
||||||
}
|
}
|
||||||
|
|
||||||
subtitle_text.setCues(
|
|
||||||
listOf(
|
|
||||||
Cue.Builder()
|
|
||||||
.setTextSize(
|
|
||||||
getPixels(TypedValue.COMPLEX_UNIT_SP, 25.0f).toFloat(),
|
|
||||||
Cue.TEXT_SIZE_TYPE_ABSOLUTE
|
|
||||||
)
|
|
||||||
.setText(subtitle_text.context.getString(R.string.subtitles_example_text))
|
|
||||||
.build()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,235 +1,248 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/subs_root"
|
android:id="@+id/subs_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/primaryBlackBackground">
|
android:background="?attr/primaryBlackBackground">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_rowWeight="1"
|
android:layout_rowWeight="1"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:paddingStart="20dp"
|
android:paddingStart="20dp"
|
||||||
android:paddingEnd="20dp"
|
android:paddingEnd="20dp"
|
||||||
android:text="@string/subtitles_settings"
|
android:text="@string/subtitles_settings"
|
||||||
android:textColor="?attr/textColor"
|
android:textColor="?attr/textColor"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="75sp">
|
android:layout_height="75sp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:contentDescription="@string/preview_background_img_des"
|
android:contentDescription="@string/preview_background_img_des"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/subtitles_preview_background" />
|
android:src="@drawable/subtitles_preview_background" />
|
||||||
|
|
||||||
<com.google.android.exoplayer2.ui.SubtitleView
|
<com.google.android.exoplayer2.ui.SubtitleView
|
||||||
android:id="@+id/subtitle_text"
|
android:id="@+id/subtitle_text"
|
||||||
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:foregroundGravity="center" />
|
android:foregroundGravity="center" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/subs_font"
|
android:id="@+id/subs_font"
|
||||||
style="@style/SettingsItem"
|
style="@style/SettingsItem"
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
android:nextFocusDown="@id/subs_font_size"
|
android:nextFocusDown="@id/subs_font_size"
|
||||||
android:text="@string/subs_font" />
|
android:text="@string/subs_font" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/subs_font_size"
|
android:id="@+id/subs_font_size"
|
||||||
style="@style/SettingsItem"
|
style="@style/SettingsItem"
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
|
|
||||||
android:nextFocusUp="@id/subs_font"
|
|
||||||
android:nextFocusDown="@id/subs_text_color"
|
|
||||||
android:text="@string/subs_font_size" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subs_text_color"
|
|
||||||
style="@style/SettingsItem"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
|
|
||||||
android:nextFocusUp="@id/subs_font_size"
|
|
||||||
android:nextFocusDown="@id/subs_outline_color"
|
|
||||||
android:text="@string/subs_text_color" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subs_outline_color"
|
|
||||||
style="@style/SettingsItem"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
|
|
||||||
android:nextFocusUp="@id/subs_text_color"
|
|
||||||
android:nextFocusDown="@id/subs_background_color"
|
|
||||||
android:text="@string/subs_outline_color" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subs_background_color"
|
|
||||||
style="@style/SettingsItem"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
|
|
||||||
android:nextFocusUp="@id/subs_outline_color"
|
|
||||||
android:nextFocusDown="@id/subs_window_color"
|
|
||||||
android:text="@string/subs_background_color" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subs_window_color"
|
|
||||||
style="@style/SettingsItem"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
|
|
||||||
android:nextFocusUp="@id/subs_background_color"
|
|
||||||
android:nextFocusDown="@id/subs_edge_type"
|
|
||||||
android:text="@string/subs_window_color" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subs_edge_type"
|
|
||||||
style="@style/SettingsItem"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
|
|
||||||
android:nextFocusUp="@id/subs_window_color"
|
|
||||||
android:nextFocusDown="@id/subs_subtitle_elevation"
|
|
||||||
android:text="@string/subs_edge_type" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subs_subtitle_elevation"
|
|
||||||
style="@style/SettingsItem"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
|
|
||||||
android:nextFocusUp="@id/subs_edge_type"
|
|
||||||
android:nextFocusDown="@id/subs_auto_select_language"
|
|
||||||
android:text="@string/subs_subtitle_elevation" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subs_auto_select_language"
|
|
||||||
style="@style/SettingsItem"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
|
|
||||||
android:nextFocusUp="@id/subs_subtitle_elevation"
|
|
||||||
android:nextFocusDown="@id/subs_download_languages"
|
|
||||||
android:text="@string/subs_auto_select_language" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subs_download_languages"
|
|
||||||
style="@style/SettingsItem"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
|
|
||||||
android:nextFocusUp="@id/subs_auto_select_language"
|
|
||||||
android:nextFocusDown="@id/subtitles_remove_bloat"
|
|
||||||
android:text="@string/subs_download_languages" />
|
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
||||||
android:nextFocusUp="@id/subs_download_languages"
|
|
||||||
android:nextFocusDown="@id/subtitles_remove_captions"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
android:fontFamily="@font/google_sans"
|
|
||||||
style="@style/SettingsItem"
|
|
||||||
app:drawableEndCompat="@null"
|
|
||||||
android:id="@+id/subtitles_remove_bloat"
|
|
||||||
android:text="@string/subtitles_remove_bloat"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
||||||
android:nextFocusUp="@id/subtitles_remove_bloat"
|
|
||||||
android:nextFocusDown="@id/apply_btt"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
|
||||||
android:fontFamily="@font/google_sans"
|
|
||||||
style="@style/SettingsItem"
|
|
||||||
app:drawableEndCompat="@null"
|
|
||||||
android:id="@+id/subtitles_remove_captions"
|
|
||||||
android:text="@string/subtitles_remove_captions"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
||||||
android:nextFocusUp="@id/subtitles_remove_captions"
|
|
||||||
android:nextFocusDown="@id/apply_btt"
|
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
android:fontFamily="@font/google_sans"
|
|
||||||
|
android:nextFocusUp="@id/subs_font"
|
||||||
|
android:nextFocusDown="@id/subs_text_color"
|
||||||
|
android:text="@string/subs_font_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subs_text_color"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/subs_font_size"
|
||||||
|
android:nextFocusDown="@id/subs_outline_color"
|
||||||
|
android:text="@string/subs_text_color" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subs_outline_color"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/subs_text_color"
|
||||||
|
android:nextFocusDown="@id/subs_background_color"
|
||||||
|
android:text="@string/subs_outline_color" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subs_background_color"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/subs_outline_color"
|
||||||
|
android:nextFocusDown="@id/subs_window_color"
|
||||||
|
android:text="@string/subs_background_color" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subs_window_color"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/subs_background_color"
|
||||||
|
android:nextFocusDown="@id/subs_edge_type"
|
||||||
|
android:text="@string/subs_window_color" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subs_edge_type"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/subs_window_color"
|
||||||
|
android:nextFocusDown="@id/subs_subtitle_elevation"
|
||||||
|
android:text="@string/subs_edge_type" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subs_subtitle_elevation"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/subs_edge_type"
|
||||||
|
android:nextFocusDown="@id/subs_auto_select_language"
|
||||||
|
android:text="@string/subs_subtitle_elevation" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subs_auto_select_language"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/subs_subtitle_elevation"
|
||||||
|
android:nextFocusDown="@id/subs_download_languages"
|
||||||
|
android:text="@string/subs_auto_select_language" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subs_download_languages"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/subs_auto_select_language"
|
||||||
|
android:nextFocusDown="@id/subtitles_remove_bloat"
|
||||||
|
android:text="@string/subs_download_languages" />
|
||||||
|
|
||||||
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
|
android:id="@+id/subtitles_remove_bloat"
|
||||||
style="@style/SettingsItem"
|
style="@style/SettingsItem"
|
||||||
app:drawableEndCompat="@null"
|
|
||||||
android:id="@+id/subtitles_filter_sub_lang"
|
|
||||||
android:text="@string/subtitles_filter_lang"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:fontFamily="@font/google_sans"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
android:nextFocusUp="@id/subs_download_languages"
|
||||||
|
android:nextFocusDown="@id/subtitles_remove_captions"
|
||||||
|
android:text="@string/subtitles_remove_bloat"
|
||||||
|
app:drawableEndCompat="@null" />
|
||||||
|
|
||||||
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
|
android:id="@+id/subtitles_remove_captions"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fontFamily="@font/google_sans"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
android:nextFocusUp="@id/subtitles_remove_bloat"
|
||||||
|
android:nextFocusDown="@id/subtitles_filter_sub_lang"
|
||||||
|
android:text="@string/subtitles_remove_captions"
|
||||||
|
app:drawableEndCompat="@null" />
|
||||||
|
|
||||||
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
|
android:id="@+id/subtitles_filter_sub_lang"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fontFamily="@font/google_sans"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
android:nextFocusUp="@id/subtitles_remove_captions"
|
||||||
|
android:nextFocusDown="@id/subtitles_uppercase"
|
||||||
|
android:text="@string/subtitles_filter_lang"
|
||||||
|
app:drawableEndCompat="@null" />
|
||||||
|
|
||||||
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
|
android:id="@+id/subtitles_uppercase"
|
||||||
|
style="@style/SettingsItem"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fontFamily="@font/google_sans"
|
||||||
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
|
android:nextFocusUp="@id/subtitles_filter_sub_lang"
|
||||||
|
android:nextFocusDown="@id/apply_btt"
|
||||||
|
android:text="@string/uppercase_all_subtitles"
|
||||||
|
app:drawableEndCompat="@null" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_rowWeight="1"
|
android:layout_rowWeight="1"
|
||||||
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/subs_hold_to_reset_to_default"
|
android:text="@string/subs_hold_to_reset_to_default"
|
||||||
android:textColor="?attr/textColor"
|
android:textColor="?attr/textColor"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/subs_import_text"
|
android:id="@+id/subs_import_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_rowWeight="1"
|
android:layout_rowWeight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/subs_import_text"
|
android:text="@string/subs_import_text"
|
||||||
android:textColor="?attr/textColor"
|
android:textColor="?attr/textColor"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:gravity="bottom|end"
|
android:gravity="bottom|end"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/apply_btt"
|
android:id="@+id/apply_btt"
|
||||||
style="@style/WhiteButton"
|
style="@style/WhiteButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_gravity="center_vertical|end"
|
android:layout_gravity="center_vertical|end"
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
android:nextFocusUp="@id/subtitles_remove_captions"
|
android:nextFocusUp="@id/subtitles_remove_captions"
|
||||||
android:text="@string/sort_apply"
|
android:text="@string/sort_apply"
|
||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<requestFocus />
|
<requestFocus />
|
||||||
</com.google.android.material.button.MaterialButton>
|
</com.google.android.material.button.MaterialButton>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/cancel_btt"
|
android:id="@+id/cancel_btt"
|
||||||
style="@style/BlackButton"
|
style="@style/BlackButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_gravity="center_vertical|end"
|
android:layout_gravity="center_vertical|end"
|
||||||
android:nextFocusLeft="@id/apply_btt"
|
android:nextFocusLeft="@id/apply_btt"
|
||||||
android:nextFocusUp="@id/subtitles_remove_captions"
|
android:nextFocusUp="@id/subtitles_remove_captions"
|
||||||
android:text="@string/sort_cancel" />
|
android:text="@string/sort_cancel" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
|
@ -601,4 +601,5 @@
|
||||||
<string name="blank_repo_message">Add a repository to install site extensions</string>
|
<string name="blank_repo_message">Add a repository to install site extensions</string>
|
||||||
<string name="view_public_repositories_button">View community repositories</string>
|
<string name="view_public_repositories_button">View community repositories</string>
|
||||||
<string name="view_public_repositories_button_short">Public list</string>
|
<string name="view_public_repositories_button_short">Public list</string>
|
||||||
|
<string name="uppercase_all_subtitles">Uppercase all subtitles</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue