Minor formatting

This commit is contained in:
arkon 2020-01-23 20:51:37 -05:00
parent f4bb9b604a
commit f1cca207fc
21 changed files with 159 additions and 145 deletions

View File

@ -41,7 +41,6 @@ open class CheckboxItem(val filter: Filter.CheckBox) : AbstractFlexibleItem<Chec
}
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
val check: CheckBox = itemView.findViewById(R.id.nav_view_item)
}
}

View File

@ -40,7 +40,6 @@ class GroupItem(val filter: Filter.Group<*>) : AbstractExpandableHeaderItem<Grou
R.drawable.ic_chevron_right_white_24dp)
holder.itemView.setOnClickListener(holder)
}
override fun equals(other: Any?): Boolean {
@ -53,15 +52,12 @@ class GroupItem(val filter: Filter.Group<*>) : AbstractExpandableHeaderItem<Grou
return filter.hashCode()
}
open class Holder(view: View, adapter: FlexibleAdapter<*>) : ExpandableViewHolder(view, adapter, true) {
val title: TextView = itemView.findViewById(R.id.title)
val icon: ImageView = itemView.findViewById(R.id.expand_icon)
override fun shouldNotifyParentOnClick(): Boolean {
return true
}
}
}

View File

@ -22,7 +22,6 @@ class SeparatorItem(val filter: Filter.Separator) : AbstractHeaderItem<Separator
}
override fun bindViewHolder(adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, holder: Holder, position: Int, payloads: List<Any?>?) {
}
override fun equals(other: Any?): Boolean {

View File

@ -37,7 +37,6 @@ class SortGroup(val filter: Filter.Sort) : AbstractExpandableHeaderItem<SortGrou
R.drawable.ic_chevron_right_white_24dp)
holder.itemView.setOnClickListener(holder)
}
override fun equals(other: Any?): Boolean {

View File

@ -69,7 +69,6 @@ class SortItem(val name: String, val group: SortGroup) : AbstractSectionableItem
}
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
val text: CheckedTextView = itemView.findViewById(R.id.nav_view_item)
}

View File

@ -43,7 +43,6 @@ open class TextItem(val filter: Filter.Text) : AbstractFlexibleItem<TextItem.Hol
}
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
val wrapper: TextInputLayout = itemView.findViewById(R.id.nav_view_item_wrapper)
val edit: EditText = itemView.findViewById(R.id.nav_view_item)
}

View File

@ -64,7 +64,6 @@ open class TriStateItem(val filter: Filter.TriState) : AbstractFlexibleItem<TriS
}
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
val text: CheckedTextView = itemView.findViewById(TR.id.nav_view_item)
init {

View File

@ -1,16 +1,18 @@
<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=".CatalogueListActivity">
xmlns:tools="http://schemas.android.com/tools"
tools:context=".CatalogueListActivity">
<item
android:id="@+id/action_search"
android:title="@string/action_search"
android:icon="@drawable/ic_search_white_24dp"
app:showAsAction="collapseActionView|ifRoom"
app:actionViewClass="androidx.appcompat.widget.SearchView"/>
android:title="@string/action_search"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="collapseActionView|ifRoom" />
<item android:id="@+id/action_settings"
android:title="@string/pref_category_sources"
<item
android:id="@+id/action_settings"
android:icon="@drawable/ic_settings_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/pref_category_sources"
app:showAsAction="ifRoom" />
</menu>

View File

@ -1,11 +1,12 @@
<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=".CatalogueListActivity">
xmlns:tools="http://schemas.android.com/tools"
tools:context=".CatalogueListActivity">
<item
android:id="@+id/action_search"
android:title="@string/action_search"
android:icon="@drawable/ic_search_white_24dp"
app:showAsAction="collapseActionView|ifRoom"
app:actionViewClass="androidx.appcompat.widget.SearchView"/>
android:title="@string/action_search"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="collapseActionView|ifRoom" />
</menu>

View File

@ -3,14 +3,16 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_edit"
android:title="@string/action_edit"
<item
android:id="@+id/action_edit"
android:icon="@drawable/ic_create_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_edit"
app:showAsAction="ifRoom" />
<item android:id="@+id/action_delete"
android:title="@string/action_delete"
<item
android:id="@+id/action_delete"
android:icon="@drawable/ic_delete_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_delete"
app:showAsAction="ifRoom" />
</menu>

View File

@ -7,22 +7,22 @@
android:id="@+id/action_download"
android:title="@string/action_download"
android:visible="true"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_delete"
android:title="@string/action_delete"
android:visible="false"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_mark_as_read"
android:title="@string/action_mark_as_read"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_mark_as_unread"
android:title="@string/action_mark_as_unread"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
</menu>

View File

@ -7,24 +7,24 @@
android:id="@+id/action_download"
android:icon="@drawable/ic_file_download_white_24dp"
android:title="@string/action_download"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_delete"
android:icon="@drawable/ic_delete_white_24dp"
android:title="@string/action_delete"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_mark_as_read"
android:icon="@drawable/ic_done_all_white_24dp"
android:title="@string/action_mark_as_read"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_mark_as_unread"
android:icon="@drawable/ic_done_all_grey_24dp"
android:title="@string/action_mark_as_unread"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
</menu>

View File

@ -3,29 +3,34 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_download"
android:title="@string/action_download"
<item
android:id="@+id/action_download"
android:icon="@drawable/ic_file_download_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_download"
app:showAsAction="ifRoom" />
<item android:id="@+id/action_delete"
android:title="@string/action_delete"
<item
android:id="@+id/action_delete"
android:icon="@drawable/ic_delete_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_delete"
app:showAsAction="ifRoom" />
<item android:id="@+id/action_mark_as_read"
android:title="@string/action_mark_as_read"
<item
android:id="@+id/action_mark_as_read"
android:icon="@drawable/ic_done_all_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_mark_as_read"
app:showAsAction="ifRoom" />
<item android:id="@+id/action_mark_as_unread"
android:title="@string/action_mark_as_unread"
<item
android:id="@+id/action_mark_as_unread"
android:icon="@drawable/ic_done_all_grey_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_mark_as_unread"
app:showAsAction="ifRoom" />
<item android:id="@+id/action_select_all"
android:title="@string/action_select_all"
<item
android:id="@+id/action_select_all"
android:icon="@drawable/ic_select_all_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_select_all"
app:showAsAction="ifRoom" />
</menu>

View File

@ -2,30 +2,36 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/action_download"
<item
android:id="@+id/action_download"
android:title="@string/action_download"
android:visible="true" />
<item
android:id="@+id/action_delete"
android:title="@string/action_delete"
android:visible="false"/>
android:visible="false" />
<item android:id="@+id/action_bookmark"
<item
android:id="@+id/action_bookmark"
android:title="@string/action_bookmark"
android:visible="true" />
<item android:id="@+id/action_remove_bookmark"
<item
android:id="@+id/action_remove_bookmark"
android:title="@string/action_remove_bookmark"
android:visible="true" />
<item android:id="@+id/action_mark_as_read"
<item
android:id="@+id/action_mark_as_read"
android:title="@string/action_mark_as_read" />
<item android:id="@+id/action_mark_as_unread"
<item
android:id="@+id/action_mark_as_unread"
android:title="@string/action_mark_as_unread" />
<item android:id="@+id/action_mark_previous_as_read"
android:title="@string/action_mark_previous_as_read"/>
<item
android:id="@+id/action_mark_previous_as_read"
android:title="@string/action_mark_previous_as_read" />
</menu>

View File

@ -11,22 +11,22 @@
<item
android:id="@+id/action_filter_read"
android:checkable="true"
android:title="@string/action_filter_read"/>
android:title="@string/action_filter_read" />
<item
android:id="@+id/action_filter_unread"
android:checkable="true"
android:title="@string/action_filter_unread"/>
android:title="@string/action_filter_unread" />
<item
android:id="@+id/action_filter_downloaded"
android:checkable="true"
android:title="@string/action_filter_downloaded"/>
android:title="@string/action_filter_downloaded" />
<item
android:id="@+id/action_filter_bookmarked"
android:checkable="true"
android:title="@string/action_filter_bookmarked"/>
android:title="@string/action_filter_bookmarked" />
<item
android:id="@+id/action_filter_empty"
android:title="@string/action_filter_empty"/>
android:title="@string/action_filter_empty" />
</menu>
</item>
@ -34,7 +34,7 @@
android:id="@+id/action_sort"
android:icon="@drawable/ic_sort_by_numeric_white_24dp"
android:title="@string/action_sort"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_display_mode"

View File

@ -2,21 +2,24 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:title="@string/action_start"
<item
android:id="@+id/start_queue"
android:icon="@drawable/ic_play_arrow_white_24dp"
android:title="@string/action_start"
android:visible="false"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item android:title="@string/action_pause"
<item
android:id="@+id/pause_queue"
android:icon="@drawable/ic_pause_white_24dp"
android:title="@string/action_pause"
android:visible="false"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item android:title="@string/action_clear"
<item
android:id="@+id/clear_queue"
android:title="@string/action_clear"
android:visible="false"
app:showAsAction="never"/>
app:showAsAction="never" />
</menu>

View File

@ -8,28 +8,28 @@
android:icon="@drawable/ic_search_white_24dp"
android:title="@string/action_search"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="collapseActionView|ifRoom"/>
app:showAsAction="collapseActionView|ifRoom" />
<item
android:id="@+id/action_filter"
android:icon="@drawable/ic_filter_list_white_24dp"
android:title="@string/action_filter"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_update_library"
android:icon="@drawable/ic_refresh_white_24dp"
android:title="@string/action_update_library"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_edit_categories"
android:title="@string/action_edit_categories"
app:showAsAction="never"/>
app:showAsAction="never" />
<item
android:id="@+id/action_source_migration"
android:title="@string/label_migration"
app:showAsAction="never"/>
app:showAsAction="never" />
</menu>

View File

@ -3,24 +3,28 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_edit_cover"
android:title="@string/action_edit_cover"
<item
android:id="@+id/action_edit_cover"
android:icon="@drawable/ic_create_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_edit_cover"
app:showAsAction="ifRoom" />
<item android:id="@+id/action_move_to_category"
android:title="@string/action_move_category"
<item
android:id="@+id/action_move_to_category"
android:icon="@drawable/ic_label_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_move_category"
app:showAsAction="ifRoom" />
<item android:id="@+id/action_delete"
android:title="@string/action_delete"
<item
android:id="@+id/action_delete"
android:icon="@drawable/ic_delete_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_delete"
app:showAsAction="ifRoom" />
<item android:id="@+id/action_select_all"
android:title="@string/action_select_all"
<item
android:id="@+id/action_select_all"
android:icon="@drawable/ic_select_all_white_24dp"
app:showAsAction="ifRoom"/>
android:title="@string/action_select_all"
app:showAsAction="ifRoom" />
</menu>

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:id="@+id/group_feature"
<group
android:id="@+id/group_feature"
android:checkableBehavior="single">
<item
android:checked="true"
android:id="@+id/nav_drawer_library"
android:checked="true"
android:icon="@drawable/ic_book_black_24dp"
android:title="@string/label_library" />
<item
@ -14,7 +15,7 @@
<item
android:id="@+id/nav_drawer_recently_read"
android:icon="@drawable/ic_glasses_black_24dp"
android:title="@string/label_recent_manga"/>
android:title="@string/label_recent_manga" />
<item
android:id="@+id/nav_drawer_catalogues"
android:icon="@drawable/ic_explore_black_24dp"
@ -22,24 +23,25 @@
<item
android:id="@+id/nav_drawer_extensions"
android:icon="@drawable/ic_extension_black_24dp"
android:title="@string/label_extensions"/>
android:title="@string/label_extensions" />
<item
android:id="@+id/nav_drawer_downloads"
android:checkable="false"
android:icon="@drawable/ic_file_download_black_24dp"
android:title="@string/label_download_queue"
android:checkable="false" />
android:title="@string/label_download_queue" />
</group>
<group android:id="@+id/group_settings"
<group
android:id="@+id/group_settings"
android:checkableBehavior="single">
<item
android:id="@+id/nav_drawer_settings"
android:checkable="false"
android:icon="@drawable/ic_settings_black_24dp"
android:title="@string/label_settings"
android:checkable="false" />
android:title="@string/label_settings" />
<item
android:id="@+id/nav_drawer_help"
android:checkable="false"
android:icon="@drawable/ic_help_black_24dp"
android:title="@string/label_help"
android:checkable="false" />
android:title="@string/label_help" />
</group>
</menu>

View File

@ -6,6 +6,6 @@
android:id="@+id/action_change_source"
android:icon="@drawable/ic_filter_list_white_24dp"
android:title="@string/action_filter"
app:showAsAction="always"/>
app:showAsAction="always" />
</menu>

View File

@ -12,7 +12,6 @@
android:id="@+id/action_settings"
android:icon="@drawable/ic_settings_white_24dp"
android:title="@string/label_settings"
app:showAsAction="ifRoom"
/>
app:showAsAction="ifRoom" />
</menu>