Add an option to use custom brightness

This commit is contained in:
inorichi
2015-11-22 20:03:48 +01:00
parent 9b504126d0
commit 85dcfd2beb
17 changed files with 309 additions and 14 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#333333"
android:paddingRight="10dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:paddingBottom="5dp">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/grey_text"
android:text="@string/pref_custom_brightness"
android:id="@+id/custom_brightness" />
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/brightness_seekbar" />
</LinearLayout>

View File

@@ -72,14 +72,16 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/lock_orientation"
android:src="@drawable/ic_screen_rotation"
android:id="@+id/reader_brightness"
android:src="@drawable/ic_brightness_high"
android:layout_gravity="center_vertical"
android:background="?android:selectableItemBackground" />
<ImageButton
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/lock_orientation"
android:src="@drawable/ic_screen_rotation"
android:layout_gravity="center_vertical"
android:background="?android:selectableItemBackground" />
<ImageButton

View File

@@ -10,6 +10,8 @@
<string name="pref_enable_transitions_key">pref_enable_transitions_key</string>
<string name="pref_show_page_number_key">pref_show_page_number_key</string>
<string name="pref_keep_screen_on_key">pref_keep_screen_on_key</string>
<string name="pref_custom_brightness_key">pref_custom_brightness_key</string>
<string name="pref_custom_brightness_value_key">pref_custom_brightness_value_key</string>
<string name="pref_download_directory_key">pref_download_directory_key</string>
<string name="pref_download_threads_key">pref_download_threads_key</string>

View File

@@ -28,15 +28,16 @@
<!-- Reader section -->
<string name="pref_hide_status_bar">Hide status bar</string>
<string name="pref_lock_orientation">Lock orientation</string>
<string name="pref_enable_transitions">Enable transitions</string>
<string name="pref_show_page_number">Show page number</string>
<string name="pref_custom_brightness">Use custom brightness</string>
<string name="pref_viewer_type">Default viewer</string>
<string name="default_viewer">Default</string>
<string name="left_to_right_viewer">Left to right</string>
<string name="right_to_left_viewer">Right to left</string>
<string name="vertical_viewer">Vertical</string>
<string name="webtoon_viewer">Webtoon (experimental)</string>
<string name="pref_lock_orientation">Lock orientation</string>
<string name="pref_enable_transitions">Enable transitions</string>
<string name="pref_show_page_number">Show page number</string>
<!-- Downloads section -->
<string name="pref_download_directory">Downloads directory</string>

View File

@@ -103,6 +103,10 @@
<item name="android:windowEnterAnimation">@anim/enter_from_right</item>
<item name="android:windowExitAnimation">@anim/exit_to_right</item>
</style>
<style name="reader_brightness_popup_animation">
<item name="android:windowEnterAnimation">@anim/enter_from_left</item>
<item name="android:windowExitAnimation">@anim/exit_to_left</item>
</style>
<style name="grey_text">
<item name="android:textColor">#e0e0e0</item>
</style>

View File

@@ -17,6 +17,10 @@
android:key="@string/pref_show_page_number_key"
android:defaultValue="true" />
<CheckBoxPreference android:title="@string/pref_custom_brightness"
android:key="@string/pref_custom_brightness_key"
android:defaultValue="false" />
<ListPreference android:title="@string/pref_viewer_type"
android:key="@string/pref_default_viewer_key"
android:entries="@array/viewers"