added sponsorblock settings in download card and other fixes in format data not being correct
This commit is contained in:
parent
071e080aae
commit
0e23d88c74
9 changed files with 256 additions and 94 deletions
|
|
@ -3,4 +3,5 @@ package com.deniscerri.ytdlnis.database.models
|
|||
data class AudioPreferences(
|
||||
var embedThumb: Boolean = true,
|
||||
var splitByChapters: Boolean = false,
|
||||
var sponsorBlockFilters: ArrayList<String>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@ data class VideoPreferences (
|
|||
var embedSubs: Boolean = true,
|
||||
var addChapters: Boolean = true,
|
||||
var splitByChapters: Boolean = false,
|
||||
var sponsorBlockFilters: ArrayList<String>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -118,8 +118,10 @@ class DownloadViewModel(application: Application) : AndroidViewModel(application
|
|||
else -> sharedPreferences.getString("command_path", getApplication<App>().resources.getString(R.string.command_path))
|
||||
}
|
||||
|
||||
val audioPreferences = AudioPreferences(embedThumb)
|
||||
val videoPreferences = VideoPreferences(embedSubs, addChapters)
|
||||
val sponsorblock = sharedPreferences.getStringSet("sponsorblock_filters", emptySet())
|
||||
|
||||
val audioPreferences = AudioPreferences(embedThumb, false, ArrayList(sponsorblock!!))
|
||||
val videoPreferences = VideoPreferences(embedSubs, addChapters, false, ArrayList(sponsorblock))
|
||||
|
||||
return DownloadItem(0,
|
||||
resultItem.url,
|
||||
|
|
@ -157,8 +159,10 @@ class DownloadViewModel(application: Application) : AndroidViewModel(application
|
|||
else -> sharedPreferences.getString("command_path", getApplication<App>().resources.getString(R.string.command_path))
|
||||
}
|
||||
|
||||
val audioPreferences = AudioPreferences(embedThumb)
|
||||
val videoPreferences = VideoPreferences(embedSubs, addChapters)
|
||||
val sponsorblock = sharedPreferences.getStringSet("sponsorblock_filters", emptySet())
|
||||
|
||||
val audioPreferences = AudioPreferences(embedThumb, false, ArrayList(sponsorblock!!))
|
||||
val videoPreferences = VideoPreferences(embedSubs, addChapters, false, ArrayList(sponsorblock))
|
||||
|
||||
return DownloadItem(0,
|
||||
historyItem.url,
|
||||
|
|
@ -179,30 +183,32 @@ class DownloadViewModel(application: Application) : AndroidViewModel(application
|
|||
when(type) {
|
||||
Type.audio -> {
|
||||
return try {
|
||||
formats.last { it.format_note.contains("audio", ignoreCase = true) }
|
||||
cloneFormat(formats.last { it.format_note.contains("audio", ignoreCase = true) })
|
||||
}catch (e: Exception){
|
||||
bestAudioFormat
|
||||
}
|
||||
}
|
||||
Type.video -> {
|
||||
return try {
|
||||
val theFormats = formats.ifEmpty { defaultVideoFormats }
|
||||
return cloneFormat(
|
||||
try {
|
||||
val theFormats = formats.ifEmpty { defaultVideoFormats }
|
||||
|
||||
val qualityPreference = sharedPreferences.getString("video_quality", getApplication<App>().resources.getString(R.string.best_quality))
|
||||
if (qualityPreference == getApplication<App>().resources.getString(R.string.worst_quality)){
|
||||
theFormats.first { !it.format_note.contains("audio", ignoreCase = true) }
|
||||
}
|
||||
if (qualityPreference == getApplication<App>().resources.getString(R.string.best_quality)){
|
||||
theFormats.last { !it.format_note.contains("audio", ignoreCase = true) }
|
||||
}
|
||||
try{
|
||||
theFormats.last { format -> format.format_note.contains(qualityPreference!!.substring(0, qualityPreference.length - 1)) }
|
||||
val qualityPreference = sharedPreferences.getString("video_quality", getApplication<App>().resources.getString(R.string.best_quality))
|
||||
if (qualityPreference == getApplication<App>().resources.getString(R.string.worst_quality)){
|
||||
theFormats.first { !it.format_note.contains("audio", ignoreCase = true) }
|
||||
}
|
||||
if (qualityPreference == getApplication<App>().resources.getString(R.string.best_quality)){
|
||||
theFormats.last { !it.format_note.contains("audio", ignoreCase = true) }
|
||||
}
|
||||
try{
|
||||
theFormats.last { format -> format.format_note.contains(qualityPreference!!.substring(0, qualityPreference.length - 1)) }
|
||||
}catch (e: Exception){
|
||||
theFormats.last { !it.format_note.contains("audio", ignoreCase = true) }
|
||||
}
|
||||
}catch (e: Exception){
|
||||
theFormats.last { !it.format_note.contains("audio", ignoreCase = true) }
|
||||
bestVideoFormat
|
||||
}
|
||||
}catch (e: Exception){
|
||||
bestVideoFormat
|
||||
}
|
||||
)
|
||||
}
|
||||
else -> {
|
||||
val c = commandTemplateDao.getFirst()
|
||||
|
|
@ -268,9 +274,9 @@ class DownloadViewModel(application: Application) : AndroidViewModel(application
|
|||
repository.deleteQueued()
|
||||
}
|
||||
|
||||
fun cloneDownloadItem(item: DownloadItem) : DownloadItem {
|
||||
val string = Gson().toJson(item, DownloadItem::class.java)
|
||||
return Gson().fromJson(string, DownloadItem::class.java)
|
||||
fun cloneFormat(item: Format) : Format {
|
||||
val string = Gson().toJson(item, Format::class.java)
|
||||
return Gson().fromJson(string, Format::class.java)
|
||||
}
|
||||
|
||||
suspend fun queueDownloads(items: List<DownloadItem>) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.deniscerri.ytdlnis.ui.downloadcard
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
import android.content.ClipboardManager
|
||||
import android.content.DialogInterface
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.Editable
|
||||
|
|
@ -20,6 +22,8 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
|||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.preference.MultiSelectListPreference
|
||||
import androidx.preference.Preference
|
||||
import com.deniscerri.ytdlnis.R
|
||||
import com.deniscerri.ytdlnis.database.models.DownloadItem
|
||||
import com.deniscerri.ytdlnis.database.models.Format
|
||||
|
|
@ -30,6 +34,7 @@ import com.deniscerri.ytdlnis.databinding.FragmentHomeBinding
|
|||
import com.deniscerri.ytdlnis.util.FileUtil
|
||||
import com.deniscerri.ytdlnis.util.UiUtil
|
||||
import com.google.android.material.chip.Chip
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
import com.google.gson.Gson
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
|
@ -104,8 +109,8 @@ class DownloadAudioFragment(private var resultItem: ResultItem, private var curr
|
|||
saveDir.editText!!.setText(
|
||||
fileUtil.formatPath(downloadItem.downloadPath)
|
||||
)
|
||||
saveDir.editText!!.isFocusable = false;
|
||||
saveDir.editText!!.isClickable = true;
|
||||
saveDir.editText!!.isFocusable = false
|
||||
saveDir.editText!!.isClickable = true
|
||||
saveDir.editText!!.setOnClickListener {
|
||||
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
|
||||
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
|
||||
|
|
@ -189,6 +194,49 @@ class DownloadAudioFragment(private var resultItem: ResultItem, private var curr
|
|||
downloadItem.audioPreferences.splitByChapters = splitByChapters.isChecked
|
||||
}
|
||||
|
||||
val sponsorblock = view.findViewById<Chip>(R.id.sponsorblock_filters)
|
||||
sponsorblock!!.setOnClickListener {
|
||||
val builder = MaterialAlertDialogBuilder(requireContext())
|
||||
builder.setTitle(getString(R.string.select_sponsorblock_filtering))
|
||||
val values = resources.getStringArray(R.array.sponsorblock_settings_values)
|
||||
val entries = resources.getStringArray(R.array.sponsorblock_settings_entries)
|
||||
val checkedItems : ArrayList<Boolean> = arrayListOf()
|
||||
values.forEach {
|
||||
if (downloadItem.audioPreferences.sponsorBlockFilters.contains(it)) {
|
||||
checkedItems.add(true)
|
||||
}else{
|
||||
checkedItems.add(false)
|
||||
}
|
||||
}
|
||||
|
||||
builder.setMultiChoiceItems(
|
||||
entries,
|
||||
checkedItems.toBooleanArray()
|
||||
) { dialog, which, isChecked ->
|
||||
checkedItems[which] = isChecked
|
||||
}
|
||||
|
||||
builder.setPositiveButton(
|
||||
getString(R.string.ok)
|
||||
) { dialog: DialogInterface?, which: Int ->
|
||||
downloadItem.audioPreferences.sponsorBlockFilters.clear()
|
||||
for (i in 0 until checkedItems.size) {
|
||||
if (checkedItems[i]) {
|
||||
downloadItem.audioPreferences.sponsorBlockFilters.add(values[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// handle the negative button of the alert dialog
|
||||
builder.setNegativeButton(
|
||||
getString(R.string.cancel)
|
||||
) { dialog: DialogInterface?, which: Int -> }
|
||||
|
||||
|
||||
val dialog = builder.create()
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
val copyURL = view.findViewById<Chip>(R.id.copy_url)
|
||||
copyURL.setOnClickListener {
|
||||
val clipboard: ClipboardManager =
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.deniscerri.ytdlnis.ui.downloadcard
|
|||
|
||||
import android.app.Activity
|
||||
import android.content.ClipboardManager
|
||||
import android.content.DialogInterface
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.Editable
|
||||
|
|
@ -30,6 +31,7 @@ import com.deniscerri.ytdlnis.databinding.FragmentHomeBinding
|
|||
import com.deniscerri.ytdlnis.util.FileUtil
|
||||
import com.deniscerri.ytdlnis.util.UiUtil
|
||||
import com.google.android.material.chip.Chip
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
import com.google.gson.Gson
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
|
@ -127,6 +129,11 @@ class DownloadVideoFragment(private val resultItem: ResultItem, private var curr
|
|||
var formats = mutableListOf<Format>()
|
||||
formats.addAll(resultItem.formats.filter { !it.format_note.contains("audio", ignoreCase = true) })
|
||||
val videoFormats = resources.getStringArray(R.array.video_formats)
|
||||
|
||||
val containers = requireContext().resources.getStringArray(R.array.video_containers)
|
||||
val container = view.findViewById<TextInputLayout>(R.id.downloadContainer)
|
||||
val containerAutoCompleteTextView =
|
||||
view.findViewById<AutoCompleteTextView>(R.id.container_textview)
|
||||
val containerPreference = sharedPreferences.getString("video_format", getString(R.string.defaultValue))
|
||||
|
||||
if (formats.isEmpty()) {
|
||||
|
|
@ -134,29 +141,8 @@ class DownloadVideoFragment(private val resultItem: ResultItem, private var curr
|
|||
videoFormats.forEach { formats.add(Format(it, containerPreference!!,"","", "",0, it)) }
|
||||
}
|
||||
|
||||
val containers = requireContext().resources.getStringArray(R.array.video_containers)
|
||||
|
||||
val container = view.findViewById<TextInputLayout>(R.id.downloadContainer)
|
||||
val containerAutoCompleteTextView =
|
||||
view.findViewById<AutoCompleteTextView>(R.id.container_textview)
|
||||
|
||||
container?.isEnabled = true
|
||||
containerAutoCompleteTextView?.setAdapter(
|
||||
ArrayAdapter(
|
||||
requireContext(),
|
||||
android.R.layout.simple_dropdown_item_1line,
|
||||
containers
|
||||
)
|
||||
)
|
||||
downloadItem.format.container = containerPreference!!
|
||||
containerAutoCompleteTextView!!.setText(downloadItem.format.container, false)
|
||||
|
||||
(container!!.editText as AutoCompleteTextView?)!!.onItemClickListener =
|
||||
AdapterView.OnItemClickListener { _: AdapterView<*>?, _: View?, index: Int, _: Long ->
|
||||
downloadItem.format.container = containers[index]
|
||||
}
|
||||
|
||||
val formatCard = view.findViewById<ConstraintLayout>(R.id.format_card_constraintLayout)
|
||||
|
||||
val chosenFormat = downloadItem.format
|
||||
uiUtil.populateFormatCard(formatCard, chosenFormat)
|
||||
val listener = object : OnFormatClickListener {
|
||||
|
|
@ -184,6 +170,23 @@ class DownloadVideoFragment(private val resultItem: ResultItem, private var curr
|
|||
bottomSheet.show(parentFragmentManager, "formatSheet")
|
||||
}
|
||||
|
||||
container?.isEnabled = true
|
||||
containerAutoCompleteTextView?.setAdapter(
|
||||
ArrayAdapter(
|
||||
requireContext(),
|
||||
android.R.layout.simple_dropdown_item_1line,
|
||||
containers
|
||||
)
|
||||
)
|
||||
downloadItem.format.container = containerPreference!!
|
||||
containerAutoCompleteTextView!!.setText(downloadItem.format.container, false)
|
||||
|
||||
(container!!.editText as AutoCompleteTextView?)!!.onItemClickListener =
|
||||
AdapterView.OnItemClickListener { _: AdapterView<*>?, _: View?, index: Int, _: Long ->
|
||||
downloadItem.format.container = containers[index]
|
||||
}
|
||||
|
||||
|
||||
val embedSubs = view.findViewById<Chip>(R.id.embed_subtitles)
|
||||
embedSubs!!.isChecked = downloadItem.videoPreferences.embedSubs
|
||||
embedSubs.setOnClickListener {
|
||||
|
|
@ -216,6 +219,49 @@ class DownloadVideoFragment(private val resultItem: ResultItem, private var curr
|
|||
downloadItem.SaveThumb = saveThumbnail.isChecked
|
||||
}
|
||||
|
||||
val sponsorblock = view.findViewById<Chip>(R.id.sponsorblock_filters)
|
||||
sponsorblock!!.setOnClickListener {
|
||||
val builder = MaterialAlertDialogBuilder(requireContext())
|
||||
builder.setTitle(getString(R.string.select_sponsorblock_filtering))
|
||||
val values = resources.getStringArray(R.array.sponsorblock_settings_values)
|
||||
val entries = resources.getStringArray(R.array.sponsorblock_settings_entries)
|
||||
val checkedItems : ArrayList<Boolean> = arrayListOf()
|
||||
values.forEach {
|
||||
if (downloadItem.videoPreferences.sponsorBlockFilters.contains(it)) {
|
||||
checkedItems.add(true)
|
||||
}else{
|
||||
checkedItems.add(false)
|
||||
}
|
||||
}
|
||||
|
||||
builder.setMultiChoiceItems(
|
||||
entries,
|
||||
checkedItems.toBooleanArray()
|
||||
) { dialog, which, isChecked ->
|
||||
checkedItems[which] = isChecked
|
||||
}
|
||||
|
||||
builder.setPositiveButton(
|
||||
getString(R.string.ok)
|
||||
) { dialog: DialogInterface?, which: Int ->
|
||||
downloadItem.videoPreferences.sponsorBlockFilters.clear()
|
||||
for (i in 0 until checkedItems.size) {
|
||||
if (checkedItems[i]) {
|
||||
downloadItem.videoPreferences.sponsorBlockFilters.add(values[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// handle the negative button of the alert dialog
|
||||
builder.setNegativeButton(
|
||||
getString(R.string.cancel)
|
||||
) { dialog: DialogInterface?, which: Int -> }
|
||||
|
||||
|
||||
val dialog = builder.create()
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
val copyURL = view.findViewById<Chip>(R.id.copy_url)
|
||||
copyURL.setOnClickListener {
|
||||
val clipboard: ClipboardManager =
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import android.app.Dialog
|
|||
import android.content.DialogInterface
|
||||
import android.os.Bundle
|
||||
import android.util.DisplayMetrics
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
|
|
@ -98,6 +99,7 @@ class FormatSelectionBottomSheetDialog(private val item: DownloadItem, private v
|
|||
|
||||
private fun addFormatsToView(linearLayout: LinearLayout){
|
||||
linearLayout.removeAllViews()
|
||||
Log.e("aa", formats.toString())
|
||||
for (i in formats.lastIndex downTo 0){
|
||||
val it = formats[i]
|
||||
val formatItem = LayoutInflater.from(context).inflate(R.layout.format_item, null)
|
||||
|
|
|
|||
|
|
@ -94,8 +94,18 @@ class DownloadWorker(
|
|||
if (!sharedPreferences.getBoolean("mtime", false)){
|
||||
request.addOption("--no-mtime")
|
||||
}
|
||||
val sponsorBlockFilters = sharedPreferences.getStringSet("sponsorblock_filters", emptySet())
|
||||
if (sponsorBlockFilters!!.isNotEmpty()) {
|
||||
|
||||
val sponsorBlockFilters : ArrayList<String> = when(downloadItem.type) {
|
||||
DownloadViewModel.Type.audio -> {
|
||||
downloadItem.audioPreferences.sponsorBlockFilters
|
||||
}
|
||||
//video
|
||||
else -> {
|
||||
downloadItem.videoPreferences.sponsorBlockFilters
|
||||
}
|
||||
}
|
||||
|
||||
if (sponsorBlockFilters.isNotEmpty()) {
|
||||
val filters = java.lang.String.join(",", sponsorBlockFilters)
|
||||
request.addOption("--sponsorblock-remove", filters)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,6 +197,20 @@
|
|||
android:checked="false"
|
||||
android:text="@string/split_by_chapters"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/sponsorblock_filters"
|
||||
style="@style/Widget.Material3.Chip.Assist.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="SponsorBlock"
|
||||
app:chipIconVisible="true"
|
||||
app:chipIcon="@drawable/ic_money"
|
||||
android:minWidth="30dp"
|
||||
app:cornerRadius="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/copy_url"
|
||||
|
|
|
|||
|
|
@ -168,63 +168,97 @@
|
|||
android:text="@string/adjust_video"
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/chipGroup"
|
||||
<HorizontalScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:chipSpacingVertical="0dp"
|
||||
app:singleLine="false">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/embed_subtitles"
|
||||
style="@style/Widget.Material3.Chip.Filter.Elevated"
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/chipGroup1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="@string/embed_subtitles" />
|
||||
app:chipSpacingVertical="0dp"
|
||||
app:singleLine="true">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/add_chapters"
|
||||
style="@style/Widget.Material3.Chip.Filter.Elevated"
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/embed_subtitles"
|
||||
style="@style/Widget.Material3.Chip.Filter.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="@string/embed_subtitles" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/add_chapters"
|
||||
style="@style/Widget.Material3.Chip.Filter.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="@string/add_chapter" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/split_by_chapters"
|
||||
style="@style/Widget.Material3.Chip.Filter.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="@string/split_by_chapters"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/save_thumbnail"
|
||||
style="@style/Widget.Material3.Chip.Filter.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="@string/save_thumb" />
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="@string/add_chapter" />
|
||||
app:singleLine="true">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/split_by_chapters"
|
||||
style="@style/Widget.Material3.Chip.Filter.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="@string/split_by_chapters"/>
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/sponsorblock_filters"
|
||||
style="@style/Widget.Material3.Chip.Assist.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="SponsorBlock"
|
||||
app:chipIconVisible="true"
|
||||
app:chipIcon="@drawable/ic_money"
|
||||
android:minWidth="30dp"
|
||||
app:cornerRadius="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/save_thumbnail"
|
||||
style="@style/Widget.Material3.Chip.Filter.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="@string/save_thumb" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/copy_url"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/copy_url"
|
||||
app:chipIconVisible="true"
|
||||
app:chipIcon="@drawable/ic_clipboard"
|
||||
android:minWidth="30dp"
|
||||
app:cornerRadius="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/copy_url"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/copy_url"
|
||||
app:chipIconVisible="true"
|
||||
app:chipIcon="@drawable/ic_clipboard"
|
||||
android:minWidth="30dp"
|
||||
app:cornerRadius="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
Loading…
Reference in a new issue