view_toolbar_search: Add button to clear searchView's text

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2024-06-12 16:33:04 +05:30
parent 38f8ccacee
commit 1bc396598e
3 changed files with 28 additions and 1 deletions

View File

@@ -51,6 +51,18 @@
android:paddingEnd="@dimen/padding_normal"
android:singleLine="true" />
<com.google.android.material.button.MaterialButton
android:id="@+id/clearButton"
style="@style/Widget.Material3.Button.IconButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toStartOf="@id/img_action_secondary"
android:contentDescription="@string/details_changelog"
android:visibility="gone"
app:icon="@drawable/ic_cancel"
app:iconTint="?attr/colorControlNormal" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_action_secondary"
android:layout_width="@dimen/icon_size_default"