Allow to create/remove categories. Some refactoring.
This commit is contained in:
BIN
app/src/main/res/drawable-hdpi/ic_action_add_18dp.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_action_add_18dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 134 B |
BIN
app/src/main/res/drawable-ldpi/ic_action_add_18dp.png
Normal file
BIN
app/src/main/res/drawable-ldpi/ic_action_add_18dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 119 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_add_18dp.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_action_add_18dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 116 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_add_18dp.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_action_add_18dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 168 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_add_18dp.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_action_add_18dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 242 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_action_add_18dp.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_action_add_18dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 500 B |
26
app/src/main/res/layout/fragment_edit_categories.xml
Normal file
26
app/src/main/res/layout/fragment_edit_categories.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/categories_list"
|
||||
android:choiceMode="multipleChoice"
|
||||
android:listSelector="@color/list_choice_pressed_bg_light" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_action_add_18dp"
|
||||
app:borderWidth="0dp"/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
39
app/src/main/res/layout/item_edit_categories.xml
Normal file
39
app/src/main/res/layout/item_edit_categories.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/listPreferredItemHeightLarge"
|
||||
android:paddingTop="@dimen/margin_top"
|
||||
android:paddingBottom="@dimen/margin_bottom"
|
||||
android:background="@drawable/selector_chapter_light">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:elevation="4dp"
|
||||
android:clickable="true"
|
||||
android:layout_marginLeft="@dimen/margin_left"
|
||||
android:layout_marginStart="@dimen/margin_left"
|
||||
android:layout_marginRight="@dimen/margin_right"
|
||||
android:layout_marginEnd="@dimen/margin_right"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/margin_right"
|
||||
android:layout_marginEnd="@dimen/margin_right"
|
||||
android:layout_toRightOf="@id/image"
|
||||
android:layout_toEndOf="@id/image"
|
||||
android:layout_centerInParent="true"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@color/primary_text"
|
||||
tools:text="Title"/>
|
||||
|
||||
</RelativeLayout>
|
||||
12
app/src/main/res/menu/category_selection.xml
Normal file
12
app/src/main/res/menu/category_selection.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item android:id="@+id/action_delete"
|
||||
android:title="@string/action_delete"
|
||||
android:icon="@drawable/ic_action_delete"
|
||||
android:orderInCategory="1"
|
||||
app:showAsAction="always"/>
|
||||
|
||||
</menu>
|
||||
@@ -1,17 +1,25 @@
|
||||
<menu 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" tools:context=".MainActivity">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:title="@string/action_search"
|
||||
android:icon="@drawable/ic_action_search"
|
||||
android:orderInCategory="100"
|
||||
app:showAsAction="collapseActionView|ifRoom"
|
||||
app:actionViewClass="android.support.v7.widget.SearchView"/>
|
||||
app:actionViewClass="android.support.v7.widget.SearchView" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_refresh"
|
||||
android:title="@string/action_refresh"
|
||||
android:icon="@drawable/ic_action_refresh"
|
||||
android:orderInCategory="1"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_edit_categories"
|
||||
android:title="@string/action_edit_categories"
|
||||
app:showAsAction="never" />
|
||||
|
||||
</menu>
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="margin_top">16dp</dimen>
|
||||
<dimen name="margin_bottom">16dp</dimen>
|
||||
<dimen name="margin_left">16dp</dimen>
|
||||
<dimen name="margin_right">16dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
|
||||
<dimen name="text_headline">24sp</dimen>
|
||||
<dimen name="text_large_title">22sp</dimen>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<resources>
|
||||
<string name="app_name">Mangafeed</string>
|
||||
|
||||
<string name="name">Name</string>
|
||||
|
||||
<!-- Activities and fragments labels (toolbar title) -->
|
||||
<string name="label_settings">Settings</string>
|
||||
<string name="label_download_queue">Download queue</string>
|
||||
<string name="label_library">My library</string>
|
||||
<string name="label_recent_updates">Recent updates</string>
|
||||
<string name="label_catalogues">Catalogues</string>
|
||||
<string name="label_selected">Selected: %1$d</string>
|
||||
|
||||
<!-- Actions -->
|
||||
<string name="action_settings">Settings</string>
|
||||
@@ -19,6 +22,8 @@
|
||||
<string name="action_delete">Delete</string>
|
||||
<string name="action_update">Update</string>
|
||||
<string name="action_edit">Edit</string>
|
||||
<string name="action_add_category">Add category</string>
|
||||
<string name="action_edit_categories">Edit categories</string>
|
||||
<string name="action_sort_up">Sort up</string>
|
||||
<string name="action_sort_down">Sort down</string>
|
||||
<string name="action_show_unread">Unread</string>
|
||||
@@ -118,7 +123,6 @@
|
||||
|
||||
<!-- Manga chapters fragment -->
|
||||
<string name="manga_chapters_tab">Chapters</string>
|
||||
<string name="selected_chapters_title">Selected: %1$d</string>
|
||||
<string name="manga_chapter_no_title">No title</string>
|
||||
<string name="chapter_downloaded">Downloaded</string>
|
||||
<string name="chapter_queued">Queued</string>
|
||||
|
||||
Reference in New Issue
Block a user