Add multiple chapters selection and allow to mark them as read/unread

This commit is contained in:
inorichi
2015-11-02 14:42:08 +01:00
parent 22ee78d256
commit faef785fc3
29 changed files with 299 additions and 79 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:exitFadeDuration="@android:integer/config_shortAnimTime"
android:color="?android:attr/colorControlHighlight">
<item android:id="@android:id/mask"
android:drawable="@color/list_choice_pressed_bg_light" />
<item>
<selector>
<item android:state_activated="true" android:drawable="@color/list_choice_pressed_bg_light"/>
</selector>
</item>
</ripple>

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector android:exitFadeDuration="@android:integer/config_longAnimTime"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@color/list_choice_pressed_bg_light"/>
<item android:state_pressed="true" android:drawable="@color/list_choice_pressed_bg_light"/>
<item android:state_activated="true" android:drawable="@color/list_choice_pressed_bg_light"/>
<item android:drawable="@android:color/transparent"/>
</selector>

View File

@@ -3,12 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="40dp">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/chapter_selection"/>
android:layout_height="40dp"
android:background="?attr/selectableItemBackground">
<ImageView
android:layout_width="wrap_content"

View File

@@ -0,0 +1,21 @@
<?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_mark_as_read"
android:title="@string/action_mark_as_read"
android:icon="@drawable/ic_action_done_all"
app:showAsAction="ifRoom"/>
<item android:id="@+id/action_mark_as_unread"
android:title="@string/action_mark_as_unread"
android:icon="@drawable/ic_action_undone_all"
app:showAsAction="ifRoom"/>
<item android:id="@+id/action_select_all"
android:title="@string/action_select_all"
android:icon="@drawable/ic_action_select_all"
app:showAsAction="ifRoom"/>
</menu>

View File

@@ -16,4 +16,5 @@
<color name="black_87pc">#DD000000</color>
<color name="library_text_background">#E8E8E8</color>
<color name="chapter_read_text">#909090</color>
<color name="list_choice_pressed_bg_light">#607D8B</color>
</resources>

View File

@@ -32,7 +32,7 @@
<string name="action_settings">Settings</string>
<string name="action_search">Search</string>
<string name="action_refresh">Refresh</string>
<string name="library_search_hint">Title or author...</string>
<string name="library_search_hint">Title or author</string>
<string name="action_delete">Delete</string>
<string name="library_selection_title">Selected</string>
<string name="title_activity_catalogue_list">CatalogueList</string>
@@ -77,4 +77,9 @@
<string name="chapter_progress">Page: %1$d</string>
<string name="source_requires_login">This source requires login</string>
<string name="action_select_all">Select all</string>
<string name="action_mark_as_read">Mark as read</string>
<string name="action_mark_as_unread">Mark as unread</string>
<string name="selected_chapters_title">Selected chapters: %1$d</string>
</resources>

View File

@@ -11,6 +11,7 @@
<item name="colorControlNormal">@color/white</item>
<item name="windowActionModeOverlay">true</item>
<item name="actionModeStyle">@style/Widget.ActionMode</item>
<item name="selectableItemBackground">@drawable/selector_chapter_light</item>
</style>
<style name="AppTheme.NoActionBar" parent="AppTheme">