feat(ui): Improve migration bottom sheet layout with scrollable content (#983)
* feat(ui): Improve migration bottom sheet layout with scrollable content * Using with(binding) and remove redundant Box * Simplify checkbox listener setup in MigrationBottomSheetDialog * Fix reference ID should not create new ID
This commit is contained in:
parent
4b4e4c6204
commit
a843918e7f
2 changed files with 305 additions and 293 deletions
|
|
@ -5,7 +5,10 @@ import android.widget.CompoundButton
|
||||||
import android.widget.RadioButton
|
import android.widget.RadioButton
|
||||||
import android.widget.RadioGroup
|
import android.widget.RadioGroup
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.rememberScrollState
|
||||||
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.State
|
import androidx.compose.runtime.State
|
||||||
|
|
@ -50,44 +53,54 @@ fun MigrationBottomSheetDialog(
|
||||||
// KMK <--
|
// KMK <--
|
||||||
|
|
||||||
AdaptiveSheet(onDismissRequest = onDismissRequest) {
|
AdaptiveSheet(onDismissRequest = onDismissRequest) {
|
||||||
AndroidView(
|
// Wrap AndroidView in a scrollable Column using verticalScroll
|
||||||
factory = { factoryContext ->
|
Column(
|
||||||
val binding = MigrationBottomSheetBinding.inflate(LayoutInflater.from(factoryContext))
|
modifier = Modifier
|
||||||
state.initPreferences(binding)
|
.verticalScroll(rememberScrollState())
|
||||||
// KMK -->
|
.fillMaxWidth(),
|
||||||
binding.migrateBtn.setBackgroundColor(colorScheme.primary)
|
) {
|
||||||
binding.dataLabel.setTextColor(colorScheme.primary)
|
AndroidView(
|
||||||
binding.optionsLabel.setTextColor(colorScheme.primary)
|
factory = { factoryContext ->
|
||||||
|
val binding = MigrationBottomSheetBinding.inflate(LayoutInflater.from(factoryContext))
|
||||||
|
state.initPreferences(binding)
|
||||||
|
// KMK -->
|
||||||
|
with(binding) {
|
||||||
|
migrateBtn.setBackgroundColor(colorScheme.primary)
|
||||||
|
dataLabel.setTextColor(colorScheme.primary)
|
||||||
|
optionsLabel.setTextColor(colorScheme.primary)
|
||||||
|
|
||||||
binding.migChapters.buttonTintList = colorScheme.checkboxTintList
|
listOf(
|
||||||
binding.migCategories.buttonTintList = colorScheme.checkboxTintList
|
migChapters,
|
||||||
binding.migTracking.buttonTintList = colorScheme.checkboxTintList
|
migCategories,
|
||||||
binding.migCustomCover.buttonTintList = colorScheme.checkboxTintList
|
migTracking,
|
||||||
binding.migExtra.buttonTintList = colorScheme.checkboxTintList
|
migCustomCover,
|
||||||
binding.migDeleteDownloaded.buttonTintList = colorScheme.checkboxTintList
|
migExtra,
|
||||||
|
migDeleteDownloaded,
|
||||||
|
radioButton,
|
||||||
|
radioButton2,
|
||||||
|
).forEach {
|
||||||
|
it.buttonTintList = colorScheme.checkboxTintList
|
||||||
|
}
|
||||||
|
|
||||||
binding.radioButton.buttonTintList = colorScheme.checkboxTintList
|
listOf(
|
||||||
binding.radioButton2.buttonTintList = colorScheme.checkboxTintList
|
useSmartSearch,
|
||||||
|
extraSearchParam,
|
||||||
|
skipStep,
|
||||||
|
hideNotFoundManga,
|
||||||
|
onlyShowUpdates,
|
||||||
|
).forEach {
|
||||||
|
it.trackTintList = colorScheme.trackTintList
|
||||||
|
it.thumbTintList = colorScheme.thumbTintList
|
||||||
|
}
|
||||||
|
|
||||||
binding.useSmartSearch.trackTintList = colorScheme.trackTintList
|
colorScheme.setTextInputLayoutColor(extraSearchParamInputLayout)
|
||||||
binding.extraSearchParam.trackTintList = colorScheme.trackTintList
|
colorScheme.setEditTextColor(extraSearchParamText)
|
||||||
binding.skipStep.trackTintList = colorScheme.trackTintList
|
}
|
||||||
binding.HideNotFoundManga.trackTintList = colorScheme.trackTintList
|
// KMK <--
|
||||||
binding.OnlyShowUpdates.trackTintList = colorScheme.trackTintList
|
binding.root
|
||||||
|
},
|
||||||
binding.useSmartSearch.thumbTintList = colorScheme.thumbTintList
|
)
|
||||||
binding.extraSearchParam.thumbTintList = colorScheme.thumbTintList
|
}
|
||||||
binding.skipStep.thumbTintList = colorScheme.thumbTintList
|
|
||||||
binding.HideNotFoundManga.thumbTintList = colorScheme.thumbTintList
|
|
||||||
binding.OnlyShowUpdates.thumbTintList = colorScheme.thumbTintList
|
|
||||||
|
|
||||||
colorScheme.setTextInputLayoutColor(binding.extraSearchParamInputLayout)
|
|
||||||
colorScheme.setEditTextColor(binding.extraSearchParamText)
|
|
||||||
// KMK <--
|
|
||||||
binding.root
|
|
||||||
},
|
|
||||||
modifier = Modifier.fillMaxWidth(),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,72 +118,81 @@ class MigrationBottomSheetDialogState(
|
||||||
fun initPreferences(binding: MigrationBottomSheetBinding) {
|
fun initPreferences(binding: MigrationBottomSheetBinding) {
|
||||||
val flags = preferences.migrateFlags().get()
|
val flags = preferences.migrateFlags().get()
|
||||||
|
|
||||||
binding.migChapters.isChecked = MigrationFlags.hasChapters(flags)
|
with(binding) {
|
||||||
binding.migCategories.isChecked = MigrationFlags.hasCategories(flags)
|
migChapters.isChecked = MigrationFlags.hasChapters(flags)
|
||||||
binding.migTracking.isChecked = MigrationFlags.hasTracks(flags)
|
migCategories.isChecked = MigrationFlags.hasCategories(flags)
|
||||||
binding.migCustomCover.isChecked = MigrationFlags.hasCustomCover(flags)
|
migTracking.isChecked = MigrationFlags.hasTracks(flags)
|
||||||
binding.migExtra.isChecked = MigrationFlags.hasExtra(flags)
|
migCustomCover.isChecked = MigrationFlags.hasCustomCover(flags)
|
||||||
binding.migDeleteDownloaded.isChecked = MigrationFlags.hasDeleteDownloaded(flags)
|
migExtra.isChecked = MigrationFlags.hasExtra(flags)
|
||||||
|
migDeleteDownloaded.isChecked = MigrationFlags.hasDeleteDownloaded(flags)
|
||||||
|
|
||||||
binding.migChapters.setOnCheckedChangeListener { _, _ -> setFlags(binding) }
|
listOf(
|
||||||
binding.migCategories.setOnCheckedChangeListener { _, _ -> setFlags(binding) }
|
migChapters,
|
||||||
binding.migTracking.setOnCheckedChangeListener { _, _ -> setFlags(binding) }
|
migCategories,
|
||||||
binding.migCustomCover.setOnCheckedChangeListener { _, _ -> setFlags(binding) }
|
migTracking,
|
||||||
binding.migExtra.setOnCheckedChangeListener { _, _ -> setFlags(binding) }
|
migCustomCover,
|
||||||
binding.migDeleteDownloaded.setOnCheckedChangeListener { _, _ -> setFlags(binding) }
|
migExtra,
|
||||||
|
migDeleteDownloaded,
|
||||||
|
).forEach { checkBox ->
|
||||||
|
checkBox.setOnCheckedChangeListener { _, _ -> setFlags(binding) }
|
||||||
|
}
|
||||||
|
|
||||||
binding.useSmartSearch.bindToPreference(preferences.smartMigration())
|
useSmartSearch.bindToPreference(preferences.smartMigration())
|
||||||
binding.extraSearchParamInputLayout.isVisible = false
|
extraSearchParamInputLayout.isVisible = false
|
||||||
binding.extraSearchParam.setOnCheckedChangeListener { _, isChecked ->
|
extraSearchParam.setOnCheckedChangeListener { _, isChecked ->
|
||||||
binding.extraSearchParamInputLayout.isVisible = isChecked
|
extraSearchParamInputLayout.isVisible = isChecked
|
||||||
}
|
}
|
||||||
binding.sourceGroup.bindToPreference(preferences.useSourceWithMost())
|
sourceGroup.bindToPreference(preferences.useSourceWithMost())
|
||||||
|
|
||||||
binding.skipStep.isChecked = preferences.skipPreMigration().get()
|
skipStep.isChecked = preferences.skipPreMigration().get()
|
||||||
binding.HideNotFoundManga.isChecked = preferences.hideNotFoundMigration().get()
|
hideNotFoundManga.isChecked = preferences.hideNotFoundMigration().get()
|
||||||
binding.OnlyShowUpdates.isChecked = preferences.showOnlyUpdatesMigration().get()
|
onlyShowUpdates.isChecked = preferences.showOnlyUpdatesMigration().get()
|
||||||
binding.skipStep.setOnCheckedChangeListener { _, isChecked ->
|
skipStep.setOnCheckedChangeListener { _, isChecked ->
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
binding.root.context.toast(
|
root.context.toast(
|
||||||
SYMR.strings.pre_migration_skip_toast,
|
SYMR.strings.pre_migration_skip_toast,
|
||||||
Toast.LENGTH_LONG,
|
Toast.LENGTH_LONG,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
migrateBtn.setOnClickListener {
|
||||||
|
preferences.skipPreMigration().set(skipStep.isChecked)
|
||||||
|
preferences.hideNotFoundMigration().set(hideNotFoundManga.isChecked)
|
||||||
|
preferences.showOnlyUpdatesMigration().set(onlyShowUpdates.isChecked)
|
||||||
|
onStartMigration.value(
|
||||||
|
if (useSmartSearch.isChecked && !extraSearchParamText.text.isNullOrBlank()) {
|
||||||
|
extraSearchParamText.text.toString()
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
binding.migrateBtn.setOnClickListener {
|
// KMK -->
|
||||||
preferences.skipPreMigration().set(binding.skipStep.isChecked)
|
if (!fullSettings) {
|
||||||
preferences.hideNotFoundMigration().set(binding.HideNotFoundManga.isChecked)
|
useSmartSearch.isVisible = false
|
||||||
preferences.showOnlyUpdatesMigration().set(binding.OnlyShowUpdates.isChecked)
|
extraSearchParam.isVisible = false
|
||||||
onStartMigration.value(
|
extraSearchParamInputLayout.isVisible = false
|
||||||
if (binding.useSmartSearch.isChecked && !binding.extraSearchParamText.text.isNullOrBlank()) {
|
sourceGroup.isVisible = false
|
||||||
binding.extraSearchParamText.text.toString()
|
skipStep.isVisible = false
|
||||||
} else {
|
migrateBtn.text = root.context.stringResource(MR.strings.action_save)
|
||||||
null
|
}
|
||||||
},
|
// KMK <--
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// KMK -->
|
|
||||||
if (!fullSettings) {
|
|
||||||
binding.useSmartSearch.isVisible = false
|
|
||||||
binding.extraSearchParam.isVisible = false
|
|
||||||
binding.extraSearchParamInputLayout.isVisible = false
|
|
||||||
binding.sourceGroup.isVisible = false
|
|
||||||
binding.skipStep.isVisible = false
|
|
||||||
binding.migrateBtn.text = binding.root.context.stringResource(MR.strings.action_save)
|
|
||||||
}
|
|
||||||
// KMK <--
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setFlags(binding: MigrationBottomSheetBinding) {
|
private fun setFlags(binding: MigrationBottomSheetBinding) {
|
||||||
var flags = 0
|
var flags = 0
|
||||||
if (binding.migChapters.isChecked) flags = flags or MigrationFlags.CHAPTERS
|
with(binding) {
|
||||||
if (binding.migCategories.isChecked) flags = flags or MigrationFlags.CATEGORIES
|
@Suppress("KotlinConstantConditions")
|
||||||
if (binding.migTracking.isChecked) flags = flags or MigrationFlags.TRACK
|
if (migChapters.isChecked) flags = flags or MigrationFlags.CHAPTERS
|
||||||
if (binding.migCustomCover.isChecked) flags = flags or MigrationFlags.CUSTOM_COVER
|
if (migCategories.isChecked) flags = flags or MigrationFlags.CATEGORIES
|
||||||
if (binding.migExtra.isChecked) flags = flags or MigrationFlags.EXTRA
|
if (migTracking.isChecked) flags = flags or MigrationFlags.TRACK
|
||||||
if (binding.migDeleteDownloaded.isChecked) flags = flags or MigrationFlags.DELETE_DOWNLOADED
|
if (migCustomCover.isChecked) flags = flags or MigrationFlags.CUSTOM_COVER
|
||||||
|
if (migExtra.isChecked) flags = flags or MigrationFlags.EXTRA
|
||||||
|
if (migDeleteDownloaded.isChecked) flags = flags or MigrationFlags.DELETE_DOWNLOADED
|
||||||
|
}
|
||||||
preferences.migrateFlags().set(flags)
|
preferences.migrateFlags().set(flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,232 +3,221 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/constraintLayout"
|
android:id="@+id/constraintLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:paddingVertical="8dp"
|
android:paddingVertical="8dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/data_label"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:text="@string/data_to_include_in_migration"
|
||||||
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
||||||
|
android:textColor="?attr/colorPrimary"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/constraintLayout2"
|
android:id="@+id/migration_data_group"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/transparent"
|
android:paddingHorizontal="16dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/data_label">
|
||||||
app:layout_constraintVertical_bias="0.0">
|
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.helper.widget.Flow
|
||||||
android:id="@+id/data_label"
|
android:layout_width="0dp"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="8dp"
|
android:orientation="horizontal"
|
||||||
android:layout_marginStart="8dp"
|
app:constraint_referenced_ids="mig_chapters,mig_categories,mig_tracking,mig_custom_cover,mig_extra,mig_delete_downloaded"
|
||||||
android:text="@string/data_to_include_in_migration"
|
app:flow_horizontalBias="0"
|
||||||
android:textAppearance="?attr/textAppearanceTitleMedium"
|
app:flow_horizontalGap="8dp"
|
||||||
android:textColor="?attr/colorPrimary"
|
app:flow_horizontalStyle="packed"
|
||||||
|
app:flow_verticalGap="2dp"
|
||||||
|
app:flow_wrapMode="chain"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<CheckBox
|
||||||
android:id="@+id/migration_data_group"
|
android:id="@+id/mig_chapters"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/data_label">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.helper.widget.Flow
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:constraint_referenced_ids="mig_chapters,mig_categories,mig_tracking,mig_custom_cover,mig_extra,mig_delete_downloaded"
|
|
||||||
app:flow_horizontalBias="0"
|
|
||||||
app:flow_horizontalGap="8dp"
|
|
||||||
app:flow_horizontalStyle="packed"
|
|
||||||
app:flow_verticalGap="2dp"
|
|
||||||
app:flow_wrapMode="chain"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/mig_chapters"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:checked="true"
|
|
||||||
android:text="@string/chapters" />
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/mig_categories"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:checked="true"
|
|
||||||
android:text="@string/categories" />
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/mig_tracking"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:checked="true"
|
|
||||||
android:text="@string/track" />
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/mig_custom_cover"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:checked="true"
|
|
||||||
android:text="@string/custom_cover" />
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/mig_extra"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:checked="true"
|
|
||||||
android:text="@string/log_extra" />
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/mig_delete_downloaded"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:checked="true"
|
|
||||||
android:text="@string/delete_downloaded" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/migration_data_divider"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:background="?android:attr/divider"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/migration_data_group"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/options_label"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:checked="true"
|
||||||
android:layout_marginStart="8dp"
|
android:text="@string/chapters" />
|
||||||
android:text="@string/action_settings"
|
|
||||||
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
||||||
android:textColor="?attr/colorPrimary"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/migration_data_group"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/migration_data_divider" />
|
|
||||||
|
|
||||||
<RadioGroup
|
<CheckBox
|
||||||
android:id="@+id/sourceGroup"
|
android:id="@+id/mig_categories"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="8dp"
|
android:checked="true"
|
||||||
android:orientation="vertical"
|
android:text="@string/categories" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/options_label"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/options_label">
|
|
||||||
|
|
||||||
<RadioButton
|
<CheckBox
|
||||||
android:id="@+id/radioButton"
|
android:id="@+id/mig_tracking"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingStart="0dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:text="@string/use_first_source" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/radioButton2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/use_most_chapters" />
|
|
||||||
|
|
||||||
</RadioGroup>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/sourceGroup_divider"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:background="?android:attr/divider"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/sourceGroup"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:checked="true"
|
||||||
android:paddingStart="16dp"
|
android:text="@string/track" />
|
||||||
android:paddingEnd="16dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/sourceGroup_divider">
|
|
||||||
|
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
<CheckBox
|
||||||
android:id="@+id/use_smart_search"
|
android:id="@+id/mig_custom_cover"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:checked="true"
|
||||||
android:paddingHorizontal="16.dp"
|
android:text="@string/custom_cover" />
|
||||||
android:paddingVertical="16dp"
|
|
||||||
android:text="@string/use_intelligent_search" />
|
|
||||||
|
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
<CheckBox
|
||||||
android:id="@+id/extra_search_param"
|
android:id="@+id/mig_extra"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:checked="true"
|
||||||
android:paddingHorizontal="16.dp"
|
android:text="@string/log_extra" />
|
||||||
android:paddingVertical="16dp"
|
|
||||||
android:text="@string/include_extra_search_parameter" />
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
app:boxBackgroundMode="none"
|
|
||||||
android:id="@+id/extra_search_param_input_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/extra_search_param_text"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/search_parameter"
|
|
||||||
android:importantForAutofill="no"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
|
||||||
android:id="@+id/skip_step"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:paddingHorizontal="16.dp"
|
|
||||||
android:paddingVertical="16dp"
|
|
||||||
android:text="@string/skip_this_step_next_time" />
|
|
||||||
|
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
|
||||||
android:id="@+id/Hide_not_found_manga"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:paddingHorizontal="16.dp"
|
|
||||||
android:paddingVertical="16dp"
|
|
||||||
android:text="@string/hide_not_found_entries" />
|
|
||||||
|
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
|
||||||
android:id="@+id/Only_show_updates"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginBottom="82dp"
|
|
||||||
android:paddingHorizontal="16.dp"
|
|
||||||
android:paddingVertical="16dp"
|
|
||||||
android:text="@string/only_show_updated_entries" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/mig_delete_downloaded"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="@string/delete_downloaded" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/migration_data_divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:background="?android:attr/divider"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/migration_data_group"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/options_label"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:text="@string/action_settings"
|
||||||
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
||||||
|
android:textColor="?attr/colorPrimary"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/migration_data_group"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/migration_data_divider" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/sourceGroup"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/options_label"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/options_label">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/radioButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:text="@string/use_first_source" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/radioButton2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/use_most_chapters" />
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/sourceGroup_divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:background="?android:attr/divider"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/sourceGroup"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/switches"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/sourceGroup_divider">
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/use_smart_search"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:text="@string/use_intelligent_search" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/extra_search_param"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:text="@string/include_extra_search_parameter" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
app:boxBackgroundMode="none"
|
||||||
|
android:id="@+id/extra_search_param_input_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/extra_search_param_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/search_parameter"
|
||||||
|
android:importantForAutofill="no"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
android:textSize="14sp"/>
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/skip_step"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:text="@string/skip_this_step_next_time" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/hide_not_found_manga"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:text="@string/hide_not_found_entries" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/only_show_updates"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:text="@string/only_show_updated_entries" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/migrate_btn_divider"
|
android:id="@+id/migrate_btn_divider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -237,7 +226,7 @@
|
||||||
android:background="?android:attr/divider"
|
android:background="?android:attr/divider"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintBottom_toTopOf="@id/migrate_btn" />
|
app:layout_constraintTop_toBottomOf="@id/switches" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/migrate_btn"
|
android:id="@+id/migrate_btn"
|
||||||
|
|
@ -245,10 +234,11 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="12dp"
|
||||||
android:text="@string/action_migrate"
|
android:text="@string/action_migrate"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/constraintLayout2" />
|
app:layout_constraintTop_toBottomOf="@id/migrate_btn_divider"/>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue