mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-30 13:57:57 +01:00
Allow to change number of columns
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
<eu.kanade.mangafeed.widget.AutofitRecyclerView
|
||||
android:id="@+id/library_mangas"
|
||||
style="@style/AppTheme.GridView"
|
||||
android:columnWidth="140dp"
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
app:typeface="ptsansNarrowBold"
|
||||
android:lineSpacingExtra="-4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:paddingLeft="8dp"
|
||||
|
||||
51
app/src/main/res/layout/pref_library_columns.xml
Normal file
51
app/src/main/res/layout/pref_library_columns.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/portrait"/>
|
||||
|
||||
<eu.kanade.mangafeed.widget.MinMaxNumberPicker
|
||||
android:id="@+id/portrait_columns"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:min="0"
|
||||
app:max="10"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/landscape"/>
|
||||
|
||||
<eu.kanade.mangafeed.widget.MinMaxNumberPicker
|
||||
android:id="@+id/landscape_columns"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:min="0"
|
||||
app:max="10"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,11 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pref_category_general_key">pref_category_general_key</string>
|
||||
<string name="pref_category_reader_key">pref_category_reader_key</string>
|
||||
<string name="pref_category_accounts_key">pref_category_accounts_key</string>
|
||||
<string name="pref_category_downloads_key">pref_category_downloads_key</string>
|
||||
<string name="pref_category_cache_key">pref_category_cache_key</string>
|
||||
<string name="pref_category_about_key">pref_category_about_key</string>
|
||||
|
||||
<string name="pref_library_columns_dialog_key">pref_library_columns_dialog_key</string>
|
||||
<string name="pref_library_columns_portrait_key">pref_library_columns_portrait_key</string>
|
||||
<string name="pref_library_columns_landscape_key">pref_library_columns_landscape_key</string>
|
||||
|
||||
<string name="pref_default_viewer_key">pref_default_viewer_key</string>
|
||||
<string name="pref_hide_status_bar_key">pref_hide_status_bar_key</string>
|
||||
<string name="pref_lock_orientation_key">pref_lock_orientation_key</string>
|
||||
|
||||
@@ -37,12 +37,20 @@
|
||||
|
||||
<!-- Preferences -->
|
||||
<!-- Subsections -->
|
||||
<string name="pref_category_general">General</string>
|
||||
<string name="pref_category_reader">Reader</string>
|
||||
<string name="pref_category_accounts">Accounts</string>
|
||||
<string name="pref_category_downloads">Downloads</string>
|
||||
<string name="pref_category_cache">Cache</string>
|
||||
<string name="pref_category_about">About</string>
|
||||
|
||||
<!-- General section -->
|
||||
<string name="pref_library_columns">Number of columns</string>
|
||||
<string name="portrait">Portrait</string>
|
||||
<string name="landscape">Landscape</string>
|
||||
<string name="default_columns">Default</string>
|
||||
|
||||
|
||||
<!-- Reader section -->
|
||||
<string name="pref_hide_status_bar">Hide status bar</string>
|
||||
<string name="pref_lock_orientation">Lock orientation</string>
|
||||
|
||||
9
app/src/main/res/xml/pref_general.xml
Normal file
9
app/src/main/res/xml/pref_general.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<eu.kanade.mangafeed.ui.setting.preference.LibraryColumnsDialog
|
||||
android:key="@string/pref_library_columns_dialog_key"
|
||||
android:persistent="false"
|
||||
android:title="@string/pref_library_columns"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<Preference
|
||||
android:key="@string/pref_category_general_key"
|
||||
android:persistent="false"
|
||||
android:title="@string/pref_category_general" />
|
||||
|
||||
<Preference
|
||||
android:key="@string/pref_category_reader_key"
|
||||
android:persistent="false"
|
||||
|
||||
Reference in New Issue
Block a user