Add manga-wised rotation mode settings (#4841)

* Add manga-wised rotation mode settings

Based on #3522

Co-authored-by: bboyz269 <4453811+bboyz269@users.noreply.github.com>

* Fix small mistakes

* Complete TODOs

* Rename functions

rotation -> orientation

* Fix orientation icon not changing

Bug from video

* Fix bug with force portrait not being force if a default value

Bug from video

* Backup viewer_flag as a seperate field in so legacy/forks doesn't crash

* Make viewer_flags nullable so old backups viewer gets restored

* Add migration for old rotation and viewer to new defaults ones

* Rename variable in enums

* Fix migration after OrientationType was changed

* Remove untrue comment

Co-authored-by: bboyz269 <4453811+bboyz269@users.noreply.github.com>
This commit is contained in:
Andreas
2021-04-28 14:32:47 +02:00
committed by GitHub
parent 93e6136795
commit 0fef546a0d
30 changed files with 313 additions and 234 deletions

View File

@@ -10,13 +10,6 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<eu.kanade.tachiyomi.widget.MaterialSpinnerView
android:id="@+id/rotation_mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="@array/rotation_type"
app:title="@string/pref_rotation_type" />
<eu.kanade.tachiyomi.widget.MaterialSpinnerView
android:id="@+id/background_color"
android:layout_width="match_parent"

View File

@@ -10,13 +10,30 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/for_this_series_prefs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/pref_category_for_this_series"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:layout_marginTop="16dp"
android:textAppearance="@style/TextAppearance.Medium.SubHeading" />
<eu.kanade.tachiyomi.widget.MaterialSpinnerView
android:id="@+id/viewer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:entries="@array/viewers_selector"
app:title="@string/pref_category_for_this_series" />
app:title="@string/pref_category_reading_mode" />
<eu.kanade.tachiyomi.widget.MaterialSpinnerView
android:id="@+id/rotation_mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:entries="@array/rotation_type"
app:title="@string/rotation_type" />
<!-- Pager preferences -->
<include

View File

@@ -61,6 +61,7 @@
</string-array>
<string-array name="rotation_type">
<item>@string/default_rotation_type</item>
<item>@string/rotation_free</item>
<item>@string/rotation_portrait</item>
<item>@string/rotation_landscape</item>
@@ -68,14 +69,6 @@
<item>@string/rotation_force_landscape</item>
</string-array>
<string-array name="rotation_type_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</string-array>
<string-array name="color_filter_modes">
<item>@string/filter_mode_default</item>
<item>@string/filter_mode_multiply</item>

View File

@@ -333,7 +333,9 @@
<string name="double_tap_anim_speed_0">No animation</string>
<string name="double_tap_anim_speed_normal">Normal</string>
<string name="double_tap_anim_speed_fast">Fast</string>
<string name="pref_rotation_type">Rotation</string>
<string name="pref_rotation_type">Default rotation type</string>
<string name="default_rotation_type">Default</string>
<string name="rotation_type">Rotation type</string>
<string name="rotation_free">Free</string>
<string name="rotation_portrait">Portrait</string>
<string name="rotation_landscape">Landscape</string>