mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-30 05:47:57 +01:00
Add an option to use custom brightness
This commit is contained in:
BIN
app/src/main/res/drawable-hdpi/ic_brightness_high.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_brightness_high.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 433 B |
BIN
app/src/main/res/drawable-ldpi/ic_brightness_high.png
Normal file
BIN
app/src/main/res/drawable-ldpi/ic_brightness_high.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 B |
BIN
app/src/main/res/drawable-mdpi/ic_brightness_high.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_brightness_high.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 325 B |
BIN
app/src/main/res/drawable-xhdpi/ic_brightness_high.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_brightness_high.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 570 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_brightness_high.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_brightness_high.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 816 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_brightness_high.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_brightness_high.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
23
app/src/main/res/layout/reader_brightness.xml
Normal file
23
app/src/main/res/layout/reader_brightness.xml
Normal 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>
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user