Merge branch 'library-categories' of https://github.com/doompadee/Phonograph into doompadee-library-categories

This commit is contained in:
Karim Abou Zeid 2017-12-25 23:42:32 +01:00
commit ffa33fced7
14 changed files with 567 additions and 29 deletions

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.constraint.ConstraintLayout>

View file

@ -0,0 +1,56 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"
android:focusable="true"
android:foreground="?attr/rectSelector"
android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal"
android:paddingEnd="@dimen/md_dialog_frame_margin"
android:paddingLeft="@dimen/md_dialog_frame_margin"
android:paddingRight="@dimen/md_dialog_frame_margin"
android:paddingStart="@dimen/md_dialog_frame_margin"
tools:gravity="start|center_vertical">
<com.kabouzeid.appthemehelper.common.views.ATECheckBox
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:gravity="center_vertical" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:ellipsize="end"
android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height"
android:paddingBottom="@dimen/md_listitem_vertical_margin_choice"
android:paddingLeft="@dimen/md_listitem_control_margin"
android:paddingStart="@dimen/md_listitem_control_margin"
android:paddingTop="@dimen/md_listitem_vertical_margin_choice"
android:singleLine="true"
android:textSize="@dimen/md_listitem_textsize"
tools:text="Item" />
<com.kabouzeid.gramophone.views.IconImageView
android:id="@+id/drag_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end|center_vertical"
android:clickable="false"
android:focusable="false"
android:minHeight="@dimen/md_listitem_height"
android:tint="?attr/iconColor"
android:tintMode="src_in"
app:srcCompat="@drawable/ic_drag_vertical_white_24dp"
tools:ignore="ContentDescription" />
</LinearLayout>

View file

@ -140,6 +140,7 @@
<string name="remove_action">Entfernen</string>
<string name="rename_action">Umbenennen</string>
<string name="create_action">Erstellen</string>
<string name="reset_action">Zurücksetzen</string>
<string name="x_selected">%1$d ausgewählt</string>
<string name="primary_color">Hauptfarbe</string>
<string name="accent_color">Akzentfarbe</string>
@ -284,4 +285,8 @@
<string name="pref_summary_blacklist">Der Inhalt der Ordner auf der Blacklist wird in deiner Bibliothek verborgen.</string>
<string name="reset_artist_image">Künstler-Bild zurücksetzen</string>
<string name="set_artist_image">Künstler-Bild festlegen</string>
<string name="library_categories">Bibliothek</string>
<string name="pref_summary_library_categories">Anzeige und Anordnung der einzelnen Kategorien festlegen.</string>
<string name="edit_categories">Kategorien bearbeiten</string>
<string name="at_least_one_category_must_be_enabled">Zumindest eine Kategorie muss aktiv sein.</string>
</resources>

View file

@ -141,6 +141,7 @@
<string name="remove_action">Remove</string>
<string name="rename_action">Rename</string>
<string name="create_action">Create</string>
<string name="reset_action">Reset</string>
<string name="x_selected">%1$d selected</string>
<string name="primary_color">Primary color</string>
<string name="accent_color">Accent color</string>
@ -294,4 +295,8 @@
<string name="pref_summary_blacklist">The content of blacklisted folders is hidden from your library.</string>
<string name="reset_artist_image">Reset artist image</string>
<string name="set_artist_image">Set artist image</string>
<string name="library_categories">Library categories</string>
<string name="pref_summary_library_categories">Configure visibility and order of library categories.</string>
<string name="edit_categories">Edit categories</string>
<string name="at_least_one_category_must_be_enabled">At least one category must be enabled.</string>
</resources>

View file

@ -20,6 +20,11 @@
android:positiveButtonText="@null"
android:title="@string/pref_title_general_theme" />
<com.kabouzeid.gramophone.preferences.LibraryPreference
android:key="library_categories"
android:summary="@string/pref_summary_library_categories"
android:title="@string/library_categories" />
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</android.support.v7.preference.PreferenceScreen>