add xl option (#282)

This commit is contained in:
Carlos 2020-05-02 13:51:31 -04:00 committed by GitHub
parent ea81745c8a
commit 8a1b8db614
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 9 deletions

View File

@ -433,9 +433,11 @@ class LibraryController(
)
} else {
recycler.columnWidth = when (preferences.gridSize().getOrDefault()) {
0 -> 1f
2 -> 1.66f
else -> 1.25f
1 -> 1f
2 -> 1.25f
3 -> 1.66f
4 -> 3f
else -> .66f
}
recycler.updatePaddingRelative(
start = (if (alwaysShowScroller) 2 else 5).dpToPx,

View File

@ -168,9 +168,11 @@ open class BrowseSourceController(bundle: Bundle) :
} else {
(catalogue_view.inflate(R.layout.manga_recycler_autofit) as AutofitRecyclerView).apply {
columnWidth = when (preferences.gridSize().getOrDefault()) {
0 -> 1f
2 -> 1.66f
else -> 1.25f
1 -> 1f
2 -> 1.25f
3 -> 1.66f
4 -> 3f
else -> .66f
}
(layoutManager as androidx.recyclerview.widget.GridLayoutManager).spanSizeLookup = object : androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup() {

View File

@ -75,6 +75,13 @@
<com.google.android.material.radiobutton.MaterialRadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/x_small" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:text="@string/small" />
<com.google.android.material.radiobutton.MaterialRadioButton
@ -88,6 +95,11 @@
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:text="@string/large" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:text="@string/x_large" />
</RadioGroup>
<com.google.android.material.checkbox.MaterialCheckBox

View File

@ -136,9 +136,11 @@
<string name="always_show_library_fast_scroll">Always show library fast scroll</string>
<string name="unread_badges">Unread badges</string>
<string name="uniform_covers">Uniform covers</string>
<string name="small">Small</string>
<string name="medium">Medium</string>
<string name="large">Large</string>
<string name="x_small">XS</string>
<string name="small">S</string>
<string name="medium">M</string>
<string name="large">L</string>
<string name="x_large">XL</string>
<string name="grid_options">Grid options</string>
<string name="hide_badges">Hide badges</string>
<string name="show_badges">Show badges</string>