Fix overflowed action toolbar items
This commit is contained in:
parent
a34c2b082f
commit
c74d8cf499
4 changed files with 44 additions and 22 deletions
|
@ -25,7 +25,8 @@
|
||||||
<androidx.appcompat.widget.ActionMenuView
|
<androidx.appcompat.widget.ActionMenuView
|
||||||
android:id="@+id/menu"
|
android:id="@+id/menu"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
|
|
||||||
|
|
|
@ -1,54 +1,62 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_download"
|
android:id="@+id/action_download"
|
||||||
android:icon="@drawable/ic_get_app_24dp"
|
android:icon="@drawable/ic_get_app_24dp"
|
||||||
android:title="@string/action_download"
|
android:title="@string/action_download"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_delete"
|
android:id="@+id/action_delete"
|
||||||
android:icon="@drawable/ic_delete_24dp"
|
android:icon="@drawable/ic_delete_24dp"
|
||||||
android:title="@string/action_delete"
|
android:title="@string/action_delete"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_bookmark"
|
android:id="@+id/action_bookmark"
|
||||||
android:icon="@drawable/ic_bookmark_border_24dp"
|
android:icon="@drawable/ic_bookmark_border_24dp"
|
||||||
android:title="@string/action_bookmark"
|
android:title="@string/action_bookmark"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_remove_bookmark"
|
android:id="@+id/action_remove_bookmark"
|
||||||
android:icon="@drawable/ic_bookmark_24dp"
|
android:icon="@drawable/ic_bookmark_24dp"
|
||||||
android:title="@string/action_remove_bookmark"
|
android:title="@string/action_remove_bookmark"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_mark_as_read"
|
android:id="@+id/action_mark_as_read"
|
||||||
android:icon="@drawable/ic_done_24dp"
|
android:icon="@drawable/ic_done_24dp"
|
||||||
android:title="@string/action_mark_as_read"
|
android:title="@string/action_mark_as_read"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_mark_as_unread"
|
android:id="@+id/action_mark_as_unread"
|
||||||
android:icon="@drawable/ic_done_outline_24dp"
|
android:icon="@drawable/ic_done_outline_24dp"
|
||||||
android:title="@string/action_mark_as_unread"
|
android:title="@string/action_mark_as_unread"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_mark_previous_as_read"
|
android:id="@+id/action_mark_previous_as_read"
|
||||||
android:icon="@drawable/ic_done_prev_24dp"
|
android:icon="@drawable/ic_done_prev_24dp"
|
||||||
android:title="@string/action_mark_previous_as_read"
|
android:title="@string/action_mark_previous_as_read"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -1,40 +1,46 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_move_to_category"
|
android:id="@+id/action_move_to_category"
|
||||||
android:icon="@drawable/ic_label_24dp"
|
android:icon="@drawable/ic_label_24dp"
|
||||||
android:title="@string/action_move_category"
|
android:title="@string/action_move_category"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_download_unread"
|
android:id="@+id/action_download_unread"
|
||||||
android:icon="@drawable/ic_get_app_24dp"
|
android:icon="@drawable/ic_get_app_24dp"
|
||||||
android:title="@string/action_download_unread"
|
android:title="@string/action_download_unread"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_mark_as_read"
|
android:id="@+id/action_mark_as_read"
|
||||||
android:icon="@drawable/ic_done_24dp"
|
android:icon="@drawable/ic_done_24dp"
|
||||||
android:title="@string/action_mark_as_read"
|
android:title="@string/action_mark_as_read"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_mark_as_unread"
|
android:id="@+id/action_mark_as_unread"
|
||||||
android:icon="@drawable/ic_done_outline_24dp"
|
android:icon="@drawable/ic_done_outline_24dp"
|
||||||
android:title="@string/action_mark_as_unread"
|
android:title="@string/action_mark_as_unread"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_delete"
|
android:id="@+id/action_delete"
|
||||||
android:icon="@drawable/ic_delete_24dp"
|
android:icon="@drawable/ic_delete_24dp"
|
||||||
android:title="@string/action_delete"
|
android:title="@string/action_delete"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<item
|
<item
|
||||||
|
@ -7,41 +8,47 @@
|
||||||
android:icon="@drawable/ic_get_app_24dp"
|
android:icon="@drawable/ic_get_app_24dp"
|
||||||
android:title="@string/action_download"
|
android:title="@string/action_download"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_delete"
|
android:id="@+id/action_delete"
|
||||||
android:icon="@drawable/ic_delete_24dp"
|
android:icon="@drawable/ic_delete_24dp"
|
||||||
android:title="@string/action_delete"
|
android:title="@string/action_delete"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_bookmark"
|
android:id="@+id/action_bookmark"
|
||||||
android:icon="@drawable/ic_bookmark_border_24dp"
|
android:icon="@drawable/ic_bookmark_border_24dp"
|
||||||
android:title="@string/action_bookmark"
|
android:title="@string/action_bookmark"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_remove_bookmark"
|
android:id="@+id/action_remove_bookmark"
|
||||||
android:icon="@drawable/ic_bookmark_24dp"
|
android:icon="@drawable/ic_bookmark_24dp"
|
||||||
android:title="@string/action_remove_bookmark"
|
android:title="@string/action_remove_bookmark"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_mark_as_read"
|
android:id="@+id/action_mark_as_read"
|
||||||
android:icon="@drawable/ic_done_24dp"
|
android:icon="@drawable/ic_done_24dp"
|
||||||
android:title="@string/action_mark_as_read"
|
android:title="@string/action_mark_as_read"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_mark_as_unread"
|
android:id="@+id/action_mark_as_unread"
|
||||||
android:icon="@drawable/ic_done_outline_24dp"
|
android:icon="@drawable/ic_done_outline_24dp"
|
||||||
android:title="@string/action_mark_as_unread"
|
android:title="@string/action_mark_as_unread"
|
||||||
app:iconTint="?attr/colorOnToolbar"
|
app:iconTint="?attr/colorOnToolbar"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always"
|
||||||
|
tools:ignore="AlwaysShowAction" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
Reference in a new issue