Support readWithVolumeKeys
This commit is contained in:
1 parent
8dbe24ab55
commit
4a909d4b93
2 files changed
+23
No files matched your search
@@ -47,5 +47,10 @@ class ReaderGeneralSettings @JvmOverloads constructor(context: Context, attrs: A
|
||||
binding.keepscreen.bindToPreference(readerPreferences.keepScreenOn())
|
||||
binding.longTap.bindToPreference(readerPreferences.readWithLongTap())
|
||||
binding.pageTransitions.bindToPreference(readerPreferences.pageTransitions())
|
||||
binding.volumePage.bindToPreference(readerPreferences.readWithVolumeKeys())
|
||||
binding.reserveVolumePage.bindToPreference(readerPreferences.readWithVolumeKeysInverted())
|
||||
readerPreferences.readWithVolumeKeys().asHotFlow {
|
||||
binding.reserveVolumePage.isVisible = it
|
||||
}.launchIn((context as ReaderActivity).lifecycleScope)
|
||||
}
|
||||
}
|
||||
@@ -73,6 +73,24 @@
|
||||
android:text="@string/pref_page_transitions"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/volume_page"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp"
|
||||
android:text="@string/settings_read_volume_page"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/reserve_volume_page"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp"
|
||||
android:text="@string/settings_read_reverse_volume"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
Reference in new issue
Block a user