Ignore `AlwaysShowAction` lint issue. Also make it an error, so that developer has to explicitly disable the warning.
This commit is contained in:
parent
151f6245db
commit
1ff4a5f212
|
@ -14,6 +14,7 @@
|
|||
android:id="@+id/menuDebug2"
|
||||
android:icon="@drawable/ic_debug_icon"
|
||||
android:title="Send"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
</menu>
|
|
@ -19,6 +19,9 @@
|
|||
<issue id="IconExpectedSize" severity="error" />
|
||||
<issue id="LocaleFolder" severity="error" />
|
||||
|
||||
<!-- AlwaysShowAction is considered as an error to force ignoring the issue when detected -->
|
||||
<issue id="AlwaysShowAction" severity="error" />
|
||||
|
||||
<issue id="TooManyViews" severity="warning">
|
||||
<!-- Ignore TooManyViews in debug build type -->
|
||||
<ignore path="**/src/debug/**" />
|
||||
|
|
|
@ -1124,6 +1124,7 @@ class TimelineFragment :
|
|||
.findViewById<ImageView>(R.id.action_view_icon_image)
|
||||
.setColorFilter(colorProvider.getColorFromAttribute(R.attr.colorPrimary))
|
||||
actionView.findViewById<TextView>(R.id.cart_badge).setTextOrHide("$widgetsCount")
|
||||
@Suppress("AlwaysShowAction")
|
||||
matrixAppsMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS)
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
android:icon="@drawable/ic_filter"
|
||||
android:title="@string/home_filter_placeholder_home"
|
||||
app:iconTint="?vctr_content_secondary"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
</menu>
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<?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">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_delete"
|
||||
android:icon="@drawable/ic_delete_unsent_messages"
|
||||
android:title="@string/action_delete"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_mark_as_suggested"
|
||||
|
|
Loading…
Reference in New Issue