more stuff
This commit is contained in:
parent
84f13b1c86
commit
56976125cf
13 changed files with 141 additions and 56 deletions
|
|
@ -937,7 +937,7 @@ class DownloadViewModel(private val application: Application) : AndroidViewModel
|
|||
}else {
|
||||
it.status = DownloadRepository.Status.Queued.toString()
|
||||
}
|
||||
if (it.rowNumber == 0) {
|
||||
if (it.rowNumber == 0 && items.size > 1) {
|
||||
it.rowNumber = idx + 1
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -190,7 +190,12 @@ class FolderSettingsFragment : BaseSettingsFragment() {
|
|||
}
|
||||
|
||||
var cacheSize = File(FileUtil.getCachePath(requireContext())).walkBottomUp().fold(0L) { acc, file -> acc + file.length() }
|
||||
clearCache!!.summary = "(${FileUtil.convertFileSize(cacheSize)}) ${resources.getString(R.string.clear_temporary_files_summary)}"
|
||||
val filesize = if (cacheSize < 10000) {
|
||||
"0B"
|
||||
}else {
|
||||
FileUtil.convertFileSize(cacheSize)
|
||||
}
|
||||
clearCache!!.summary = "(${filesize}) ${resources.getString(R.string.clear_temporary_files_summary)}"
|
||||
clearCache!!.onPreferenceClickListener =
|
||||
Preference.OnPreferenceClickListener {
|
||||
lifecycleScope.launch {
|
||||
|
|
@ -214,7 +219,12 @@ class FolderSettingsFragment : BaseSettingsFragment() {
|
|||
|
||||
Snackbar.make(requireView(), getString(R.string.cache_cleared), Snackbar.LENGTH_SHORT).show()
|
||||
cacheSize = File(FileUtil.getCachePath(requireContext())).walkBottomUp().fold(0L) { acc, file -> acc + file.length() }
|
||||
clearCache!!.summary = "(${FileUtil.convertFileSize(cacheSize)}) ${resources.getString(R.string.clear_temporary_files_summary)}"
|
||||
val filesize = if (cacheSize < 10000) {
|
||||
"0B"
|
||||
}else {
|
||||
FileUtil.convertFileSize(cacheSize)
|
||||
}
|
||||
clearCache!!.summary = "(${filesize}) ${resources.getString(R.string.clear_temporary_files_summary)}"
|
||||
}else{
|
||||
Snackbar.make(requireView(), getString(R.string.downloads_running_try_later), Snackbar.LENGTH_SHORT).show()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ object Extensions {
|
|||
Picasso.get()
|
||||
.load(imageURL)
|
||||
.resize(1280, 0)
|
||||
.transform(BlurTransformation(context, 7, 1))
|
||||
.transform(BlurTransformation(context, 1, 1))
|
||||
.onlyScaleDown()
|
||||
.into(this)
|
||||
|
||||
|
|
|
|||
|
|
@ -27,15 +27,15 @@ class FormatUtil(private var context: Context) {
|
|||
this.reverse()
|
||||
}
|
||||
|
||||
|
||||
private val preferSmallerFormats = sharedPreferences.getBoolean("prefer_smaller_formats", false)
|
||||
|
||||
@SuppressLint("RestrictedApi")
|
||||
fun getAudioFormatImportance() : List<String> {
|
||||
val preferredFormatSize = sharedPreferences.getString("preferred_format_size", "")
|
||||
|
||||
if (sharedPreferences.getBoolean("use_format_sorting", false)) {
|
||||
val itemValues = context.getStringArray(R.array.format_importance_audio_values).toMutableList()
|
||||
val orderPreferences = sharedPreferences.getString("format_importance_audio", itemValues.joinToString(","))!!.split(",").toMutableList()
|
||||
if (preferSmallerFormats) {
|
||||
|
||||
if (preferredFormatSize == "smallest") {
|
||||
orderPreferences.remove("file_size")
|
||||
orderPreferences.add(0,"smallsize")
|
||||
}
|
||||
|
|
@ -47,10 +47,11 @@ class FormatUtil(private var context: Context) {
|
|||
|
||||
return orderPreferences
|
||||
}else {
|
||||
val formatImportance = mutableListOf("id","codec", "container", "language", "file_size")
|
||||
if (sharedPreferences.getBoolean("prefer_smaller_formats", false)) {
|
||||
formatImportance.add(0, "smallsize")
|
||||
formatImportance.remove("file_size")
|
||||
val formatImportance = mutableListOf("id","codec", "container", "language")
|
||||
if (preferredFormatSize == "smallest") {
|
||||
formatImportance.add("smallsize")
|
||||
}else if (preferredFormatSize == "biggest") {
|
||||
formatImportance.add("file_size")
|
||||
}
|
||||
|
||||
val preferContainerOverCodec = sharedPreferences.getBoolean("prefer_container_over_codec_audio", false)
|
||||
|
|
@ -64,20 +65,24 @@ class FormatUtil(private var context: Context) {
|
|||
|
||||
@SuppressLint("RestrictedApi")
|
||||
fun getVideoFormatImportance() : List<String> {
|
||||
val preferredFormatSize = sharedPreferences.getString("preferred_format_size", "")
|
||||
|
||||
if (sharedPreferences.getBoolean("use_format_sorting", false)) {
|
||||
val itemValues = context.getStringArray(R.array.format_importance_video_values).toList()
|
||||
val orderPreferences = sharedPreferences.getString("format_importance_video", itemValues.joinToString(","))!!.split(",").toMutableList()
|
||||
if (preferSmallerFormats) {
|
||||
|
||||
if (preferredFormatSize == "smallest") {
|
||||
orderPreferences.remove("file_size")
|
||||
orderPreferences.add("smallsize")
|
||||
}
|
||||
|
||||
return orderPreferences
|
||||
}else {
|
||||
val formatImportance = mutableListOf("id","resolution", "codec", "container", "file_size")
|
||||
if (sharedPreferences.getBoolean("prefer_smaller_formats", false)) {
|
||||
val formatImportance = mutableListOf("id","resolution", "codec", "container")
|
||||
if (preferredFormatSize == "smallest") {
|
||||
formatImportance.add("smallsize")
|
||||
formatImportance.remove("file_size")
|
||||
}else if (preferredFormatSize == "biggest") {
|
||||
formatImportance.add("file_size")
|
||||
}
|
||||
|
||||
return formatImportance
|
||||
|
|
@ -101,9 +106,13 @@ class FormatUtil(private var context: Context) {
|
|||
result
|
||||
}
|
||||
"id" -> {
|
||||
(audioFormatIDPreference.contains(b.format_id)).compareTo(
|
||||
audioFormatIDPreference.contains(a.format_id)
|
||||
)
|
||||
if (audioFormatIDPreference.isEmpty()) {
|
||||
0
|
||||
}else {
|
||||
(audioFormatIDPreference.contains(b.format_id)).compareTo(
|
||||
audioFormatIDPreference.contains(a.format_id)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
"language" -> {
|
||||
|
|
@ -119,18 +128,27 @@ class FormatUtil(private var context: Context) {
|
|||
}
|
||||
|
||||
"codec" -> {
|
||||
("^(${audioCodecPreference}).*$".toRegex(RegexOption.IGNORE_CASE)
|
||||
if (audioCodecPreference.isBlank()) {
|
||||
0
|
||||
}else {
|
||||
("^(${audioCodecPreference}).*$".toRegex(RegexOption.IGNORE_CASE)
|
||||
.matches(b.acodec))
|
||||
.compareTo(
|
||||
"^(${audioCodecPreference}).*$".toRegex(RegexOption.IGNORE_CASE)
|
||||
.matches(a.acodec)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
"container" -> {
|
||||
(audioContainerPreference == b.container).compareTo(
|
||||
audioContainerPreference == a.container
|
||||
)
|
||||
if (audioContainerPreference.isBlank()) {
|
||||
0
|
||||
}else {
|
||||
(audioContainerPreference == b.container).compareTo(
|
||||
audioContainerPreference == a.container
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else -> 0
|
||||
|
|
@ -160,12 +178,20 @@ class FormatUtil(private var context: Context) {
|
|||
result
|
||||
}
|
||||
"id" -> {
|
||||
videoFormatIDPreference.contains(b.format_id).compareTo(videoFormatIDPreference.contains(a.format_id))
|
||||
if (videoFormatIDPreference.isEmpty()) {
|
||||
0
|
||||
}else {
|
||||
videoFormatIDPreference.contains(b.format_id).compareTo(videoFormatIDPreference.contains(a.format_id))
|
||||
}
|
||||
}
|
||||
"codec" -> {
|
||||
val first = videoCodecPreference.toRegex(RegexOption.IGNORE_CASE).containsMatchIn(b.vcodec.uppercase())
|
||||
val second = videoCodecPreference.toRegex(RegexOption.IGNORE_CASE).containsMatchIn(a.vcodec.uppercase())
|
||||
first.compareTo(second)
|
||||
if (videoCodecPreference.isBlank()) {
|
||||
0
|
||||
}else {
|
||||
val first = videoCodecPreference.toRegex(RegexOption.IGNORE_CASE).containsMatchIn(b.vcodec.uppercase())
|
||||
val second = videoCodecPreference.toRegex(RegexOption.IGNORE_CASE).containsMatchIn(a.vcodec.uppercase())
|
||||
first.compareTo(second)
|
||||
}
|
||||
}
|
||||
"resolution" -> {
|
||||
when (videoQualityPreference) {
|
||||
|
|
@ -201,8 +227,12 @@ class FormatUtil(private var context: Context) {
|
|||
(b.acodec == "none" || b.acodec == "").compareTo(a.acodec == "none" || a.acodec == "")
|
||||
}
|
||||
"container" -> {
|
||||
videoContainerPreference.equals(b.container, ignoreCase = true)
|
||||
.compareTo(videoContainerPreference.equals(a.container, ignoreCase = true))
|
||||
if (videoContainerPreference.isBlank()) {
|
||||
0
|
||||
}else {
|
||||
videoContainerPreference.equals(b.container, ignoreCase = true)
|
||||
.compareTo(videoContainerPreference.equals(a.container, ignoreCase = true))
|
||||
}
|
||||
}
|
||||
else -> 0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="5dp"
|
||||
app:cardElevation="0dp"
|
||||
android:checkable="true"
|
||||
app:strokeWidth="0dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
|
|
@ -126,7 +126,6 @@
|
|||
android:maxLines="2"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:shadowColor="@color/black"
|
||||
android:shadowDx="2"
|
||||
android:shadowDy="2"
|
||||
android:shadowRadius="1"
|
||||
|
|
@ -162,11 +161,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:animateLayoutChanges="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/output"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="5dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearlayout2_horizontalscrollview"
|
||||
app:layout_constraintVertical_bias="0.51"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
|
|
@ -213,18 +211,21 @@
|
|||
android:ellipsize="end"
|
||||
android:focusable="true"
|
||||
android:fontFamily="monospace"
|
||||
android:maxLines="2"
|
||||
android:gravity="bottom"
|
||||
android:maxLines="2"
|
||||
android:padding="10dp"
|
||||
android:shadowColor="#000"
|
||||
android:shadowDx="4"
|
||||
android:shadowDy="4"
|
||||
android:shadowRadius="2"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/active_pause_cancel_btns" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
style="@style/Widget.Material3.Chip.Filter.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:outlineProvider="none"
|
||||
android:checked="false"
|
||||
android:text="@string/embed_thumb"/>
|
||||
|
||||
|
|
@ -47,6 +48,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:outlineProvider="none"
|
||||
android:text="@string/split_by_chapters"/>
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
|
@ -54,15 +56,15 @@
|
|||
</HorizontalScrollView>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:scrollbars="none"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none">
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:chipSpacingVertical="0dp"
|
||||
app:singleLine="true"
|
||||
android:layout_height="wrap_content">
|
||||
app:singleLine="true">
|
||||
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
|
|
@ -71,10 +73,11 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/sponsorblock"
|
||||
app:chipIconVisible="true"
|
||||
app:chipIcon="@drawable/ic_money"
|
||||
android:minWidth="30dp"
|
||||
android:outlineProvider="none"
|
||||
android:text="@string/sponsorblock"
|
||||
app:chipIcon="@drawable/ic_money"
|
||||
app:chipIconVisible="true"
|
||||
app:cornerRadius="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -86,10 +89,11 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/bitrate"
|
||||
app:chipIconVisible="true"
|
||||
app:chipIcon="@drawable/baseline_high_quality_24"
|
||||
android:minWidth="30dp"
|
||||
android:outlineProvider="none"
|
||||
android:text="@string/bitrate"
|
||||
app:chipIcon="@drawable/baseline_high_quality_24"
|
||||
app:chipIconVisible="true"
|
||||
app:cornerRadius="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -101,10 +105,11 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/file_name_template"
|
||||
app:chipIconVisible="true"
|
||||
app:chipIcon="@drawable/ic_edit"
|
||||
android:outlineProvider="none"
|
||||
android:minWidth="30dp"
|
||||
android:text="@string/file_name_template"
|
||||
app:chipIcon="@drawable/ic_edit"
|
||||
app:chipIconVisible="true"
|
||||
app:cornerRadius="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -114,7 +119,7 @@
|
|||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
|
@ -130,6 +135,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/use_extra_commands"
|
||||
android:outlineProvider="none"
|
||||
|
||||
app:chipIconVisible="true"
|
||||
app:chipIcon="@drawable/ic_terminal"
|
||||
android:minWidth="30dp"
|
||||
|
|
@ -145,6 +152,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
app:chipIconVisible="true"
|
||||
android:outlineProvider="none"
|
||||
app:chipIcon="@drawable/ic_cut"
|
||||
android:text="@string/cut"
|
||||
android:minWidth="30dp"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:outlineProvider="none"
|
||||
android:text="@string/save_thumb" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
|
|
@ -39,6 +40,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:outlineProvider="none"
|
||||
android:text="@string/add_chapter" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
|
|
@ -47,6 +49,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:outlineProvider="none"
|
||||
android:text="@string/split_by_chapters"/>
|
||||
|
||||
|
||||
|
|
@ -76,6 +79,7 @@
|
|||
app:chipIcon="@drawable/ic_subtitles"
|
||||
android:minWidth="30dp"
|
||||
app:cornerRadius="10dp"
|
||||
android:outlineProvider="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
@ -90,6 +94,7 @@
|
|||
android:text="@string/remove_audio"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="10dp"
|
||||
android:outlineProvider="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
@ -105,6 +110,7 @@
|
|||
app:chipIcon="@drawable/ic_music"
|
||||
android:minWidth="30dp"
|
||||
app:cornerRadius="10dp"
|
||||
android:outlineProvider="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
@ -116,6 +122,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
app:chipIconVisible="true"
|
||||
android:outlineProvider="none"
|
||||
app:chipIcon="@drawable/baseline_video_metadata"
|
||||
android:text="@string/recode_video" />
|
||||
|
||||
|
|
@ -130,6 +137,7 @@
|
|||
app:chipIcon="@drawable/baseline_live_tv_24"
|
||||
android:minWidth="30dp"
|
||||
app:cornerRadius="10dp"
|
||||
android:outlineProvider="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
@ -160,6 +168,7 @@
|
|||
app:chipIcon="@drawable/ic_money"
|
||||
android:minWidth="30dp"
|
||||
app:cornerRadius="10dp"
|
||||
android:outlineProvider="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
@ -175,6 +184,7 @@
|
|||
app:chipIcon="@drawable/ic_edit"
|
||||
android:minWidth="30dp"
|
||||
app:cornerRadius="10dp"
|
||||
android:outlineProvider="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
@ -204,6 +214,7 @@
|
|||
app:chipIcon="@drawable/ic_terminal"
|
||||
android:minWidth="30dp"
|
||||
app:cornerRadius="10dp"
|
||||
android:outlineProvider="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
@ -219,6 +230,7 @@
|
|||
android:minWidth="30dp"
|
||||
android:text="@string/cut"
|
||||
app:cornerRadius="10dp"
|
||||
android:outlineProvider="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
|||
|
|
@ -281,6 +281,7 @@
|
|||
android:layout_marginEnd="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel"
|
||||
android:outlineProvider="none"
|
||||
app:icon="@drawable/ic_baseline_delete_outline_24"/>
|
||||
|
||||
<Button
|
||||
|
|
@ -289,6 +290,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cut"
|
||||
android:outlineProvider="none"
|
||||
app:icon="@drawable/ic_check"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@
|
|||
android:layout_margin="20dp"
|
||||
android:text="@string/ok"
|
||||
app:icon="@drawable/ic_check"
|
||||
android:outlineProvider="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@
|
|||
android:maxLength="17"
|
||||
android:minWidth="30dp"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:outlineProvider="none"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="10dp"
|
||||
app:drawableStartCompat="@drawable/ic_music_formatcard"
|
||||
|
|
@ -136,6 +137,7 @@
|
|||
android:backgroundTint="?attr/colorSecondary"
|
||||
android:clickable="false"
|
||||
android:gravity="center"
|
||||
android:outlineProvider="none"
|
||||
android:maxWidth="90dp"
|
||||
android:maxLines="1"
|
||||
android:minWidth="30dp"
|
||||
|
|
@ -157,6 +159,7 @@
|
|||
android:clickable="false"
|
||||
android:gravity="center"
|
||||
android:minWidth="30dp"
|
||||
android:outlineProvider="none"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="10dp"
|
||||
|
|
@ -176,6 +179,7 @@
|
|||
android:gravity="center"
|
||||
android:minWidth="30dp"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:outlineProvider="none"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
|
|
|||
|
|
@ -1574,4 +1574,16 @@
|
|||
<item>64k</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="preferred_format_size">
|
||||
<item>@string/defaultValue</item>
|
||||
<item>@string/smallest</item>
|
||||
<item>@string/largest</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="preferred_format_size_values">
|
||||
<item></item>
|
||||
<item>smallest</item>
|
||||
<item>largest</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
|
@ -486,4 +486,7 @@
|
|||
<string name="video_compatible">Compatible Video</string>
|
||||
<string name="video_compatible_summary">Recodes the video making it compatible with other apps</string>
|
||||
<string name="no_free_space_warning">There is no free space for this configuration.</string>
|
||||
<string name="preferred_format_size">Preferred Format Size</string>
|
||||
<string name="smallest">Smallest</string>
|
||||
<string name="largest">Largest</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -283,13 +283,15 @@
|
|||
|
||||
<PreferenceCategory android:title="@string/format">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:widgetLayout="@layout/preferece_material_switch"
|
||||
app:defaultValue="false"
|
||||
<ListPreference
|
||||
app:icon="@drawable/ic_format"
|
||||
app:key="prefer_smaller_formats"
|
||||
app:title="@string/prefer_smaller_formats" />
|
||||
|
||||
app:dialogTitle="@string/preferred_format_size"
|
||||
app:entries="@array/preferred_format_size"
|
||||
app:entryValues="@array/preferred_format_size_values"
|
||||
android:defaultValue=""
|
||||
app:key="preferred_format_size"
|
||||
app:useSimpleSummaryProvider="true"
|
||||
app:title="@string/preferred_format_size" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue