Minor cleanup

This commit is contained in:
arkon 2021-01-03 10:54:09 -05:00
parent 3bf7c74f93
commit 135cf9960f
4 changed files with 21 additions and 21 deletions

View File

@ -4,7 +4,6 @@ import android.os.Bundle
import android.widget.CompoundButton import android.widget.CompoundButton
import android.widget.Spinner import android.widget.Spinner
import androidx.annotation.ArrayRes import androidx.annotation.ArrayRes
import androidx.core.view.isGone
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.core.widget.NestedScrollView import androidx.core.widget.NestedScrollView
import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialog
@ -82,7 +81,7 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDia
* Init the preferences for the pager reader. * Init the preferences for the pager reader.
*/ */
private fun initPagerPreferences() { private fun initPagerPreferences() {
binding.webtoonPrefsGroup.root.isGone = true binding.webtoonPrefsGroup.root.isVisible = false
binding.pagerPrefsGroup.root.isVisible = true binding.pagerPrefsGroup.root.isVisible = true
binding.pagerPrefsGroup.tappingPrefsGroup.isVisible = preferences.readWithTapping().get() binding.pagerPrefsGroup.tappingPrefsGroup.isVisible = preferences.readWithTapping().get()
@ -99,7 +98,7 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDia
* Init the preferences for the webtoon reader. * Init the preferences for the webtoon reader.
*/ */
private fun initWebtoonPreferences() { private fun initWebtoonPreferences() {
binding.pagerPrefsGroup.root.isGone = true binding.pagerPrefsGroup.root.isVisible = false
binding.webtoonPrefsGroup.root.isVisible = true binding.webtoonPrefsGroup.root.isVisible = true
binding.webtoonPrefsGroup.tappingPrefsGroup.isVisible = preferences.readWithTapping().get() binding.webtoonPrefsGroup.tappingPrefsGroup.isVisible = preferences.readWithTapping().get()

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView <TextView
android:id="@+id/pager_prefs" android:id="@+id/pager_prefs"
@ -21,19 +21,19 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/pref_viewer_nav" android:text="@string/pref_viewer_nav"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintBaseline_toBaselineOf="@id/pager_nav"
app:layout_constraintEnd_toStartOf="@id/verticalcenter" app:layout_constraintEnd_toStartOf="@id/verticalcenter"
app:layout_constraintBaseline_toBaselineOf="@id/pager_nav"/> app:layout_constraintStart_toStartOf="parent" />
<androidx.appcompat.widget.AppCompatSpinner <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/pager_nav" android:id="@+id/pager_nav"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:entries="@array/pager_nav"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@id/pager_prefs" android:entries="@array/pager_nav"
app:layout_constraintEnd_toEndOf="@id/spinner_end"
app:layout_constraintStart_toEndOf="@id/verticalcenter" app:layout_constraintStart_toEndOf="@id/verticalcenter"
app:layout_constraintEnd_toEndOf="@id/spinner_end" /> app:layout_constraintTop_toBottomOf="@id/pager_prefs" />
<TextView <TextView
android:id="@+id/scale_type_text" android:id="@+id/scale_type_text"
@ -121,4 +121,5 @@
android:layout_width="16dp" android:layout_width="16dp"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintStart_toEndOf="parent" /> app:layout_constraintStart_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -21,7 +21,8 @@
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_toTopOf="parent"
app:tint="?attr/colorOnBackground" /> app:tint="?attr/colorOnBackground"
tools:ignore="ContentDescription" />
<android.widget.Space <android.widget.Space
android:id="@+id/spinner_end" android:id="@+id/spinner_end"
@ -215,8 +216,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/always_show_chapter_transition" /> app:layout_constraintTop_toBottomOf="@id/always_show_chapter_transition" />
<!-- Groups of preferences -->
<androidx.constraintlayout.widget.Guideline <androidx.constraintlayout.widget.Guideline
android:id="@+id/verticalcenter" android:id="@+id/verticalcenter"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView <TextView
android:id="@+id/webtoon_prefs" android:id="@+id/webtoon_prefs"
@ -40,9 +40,9 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/pref_viewer_nav" android:text="@string/pref_viewer_nav"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintBaseline_toBaselineOf="@id/webtoon_nav"
app:layout_constraintEnd_toStartOf="@id/verticalcenter" app:layout_constraintEnd_toStartOf="@id/verticalcenter"
app:layout_constraintBaseline_toBaselineOf="@id/webtoon_nav"/> app:layout_constraintStart_toStartOf="parent" />
<androidx.appcompat.widget.AppCompatSpinner <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/webtoon_nav" android:id="@+id/webtoon_nav"
@ -103,4 +103,5 @@
android:layout_width="16dp" android:layout_width="16dp"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintStart_toEndOf="parent" /> app:layout_constraintStart_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>