Remove most unused settings from the reader (keep screen on and page transitions), they are still available in the app's settings. Also lower minimum brightness to -75%

This commit is contained in:
len 2016-07-08 22:31:46 +02:00
parent 5f1a89df63
commit e08e41ae0d
3 changed files with 4 additions and 31 deletions

View File

@ -425,8 +425,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
} }
/** /**
* Sets the brightness of the screen. Range is [-50, 100]. * Sets the brightness of the screen. Range is [-75, 100].
* From -50 to -1 a semi-transparent black view is shown at the top with the minimum brightness. * From -75 to -1 a semi-transparent black view is shown at the top with the minimum brightness.
* From 1 to 100 it sets that value as brightness. * From 1 to 100 it sets that value as brightness.
* 0 sets system brightness and hides the overlay. * 0 sets system brightness and hides the overlay.
*/ */

View File

@ -77,11 +77,6 @@ class ReaderSettingsDialog : DialogFragment() {
} }
background_color.setSelection(preferences.readerTheme().getOrDefault(), false) background_color.setSelection(preferences.readerTheme().getOrDefault(), false)
enable_transitions.isChecked = preferences.enableTransitions().getOrDefault()
enable_transitions.setOnCheckedChangeListener { v, isChecked ->
preferences.enableTransitions().set(isChecked)
}
show_page_number.isChecked = preferences.showPageNumber().getOrDefault() show_page_number.isChecked = preferences.showPageNumber().getOrDefault()
show_page_number.setOnCheckedChangeListener { v, isChecked -> show_page_number.setOnCheckedChangeListener { v, isChecked ->
preferences.showPageNumber().set(isChecked) preferences.showPageNumber().set(isChecked)
@ -92,17 +87,7 @@ class ReaderSettingsDialog : DialogFragment() {
preferences.fullscreen().set(isChecked) preferences.fullscreen().set(isChecked)
} }
keep_screen_on.isChecked = preferences.keepScreenOn().getOrDefault() custom_brightness.isChecked = preferences.customBrightness().getOrDefault()
keep_screen_on.setOnCheckedChangeListener { v, isChecked ->
preferences.keepScreenOn().set(isChecked)
}
subscriptions += preferences.customBrightness().asObservable()
.subscribe { isEnabled ->
custom_brightness.isChecked = isEnabled
brightness_seekbar.isEnabled = isEnabled
}
custom_brightness.setOnCheckedChangeListener { v, isChecked -> custom_brightness.setOnCheckedChangeListener { v, isChecked ->
preferences.customBrightness().set(isChecked) preferences.customBrightness().set(isChecked)
} }

View File

@ -159,12 +159,6 @@
</LinearLayout> </LinearLayout>
<android.support.v7.widget.SwitchCompat
android:id="@+id/enable_transitions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/pref_enable_transitions"/>
<android.support.v7.widget.SwitchCompat <android.support.v7.widget.SwitchCompat
android:id="@+id/show_page_number" android:id="@+id/show_page_number"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -177,12 +171,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/pref_fullscreen"/> android:text="@string/pref_fullscreen"/>
<android.support.v7.widget.SwitchCompat
android:id="@+id/keep_screen_on"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/pref_keep_screen_on"/>
<android.support.v7.widget.SwitchCompat <android.support.v7.widget.SwitchCompat
android:id="@+id/custom_brightness" android:id="@+id/custom_brightness"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -193,7 +181,7 @@
android:id="@+id/brightness_seekbar" android:id="@+id/brightness_seekbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:dsb_min="-50" app:dsb_min="-75"
app:dsb_max="100" app:dsb_max="100"
app:dsb_indicatorFormatter="%d%%" app:dsb_indicatorFormatter="%d%%"
app:dsb_indicatorTextAppearance="@style/TextAppearance.Regular" app:dsb_indicatorTextAppearance="@style/TextAppearance.Regular"