Fixed
Status Update
Comments
al...@google.com <al...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
ri...@gmail.com <ri...@gmail.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 1b5053066a86d9de50eeb6690d653fe57568c7e3
Author: Alan Viverette <alanv@google.com>
Date: Fri Jan 07 16:25:22 2022
Make onQueryRefine protected API so that it can be overridden
Relnote: SearchView.onQueryRefine() is now protected visibility
Fixes: 212882845
Test: SearchViewTest
Change-Id: I6cce0f178402b8952f2510fb2369d5e845bdf9a5
M appcompat/appcompat/api/restricted_current.txt
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/SearchView.java
M appcompat/appcompat/api/current.txt
M appcompat/appcompat/api/public_plus_experimental_current.txt
https://android-review.googlesource.com/1940457
Branch: androidx-main
commit 1b5053066a86d9de50eeb6690d653fe57568c7e3
Author: Alan Viverette <alanv@google.com>
Date: Fri Jan 07 16:25:22 2022
Make onQueryRefine protected API so that it can be overridden
Relnote: SearchView.onQueryRefine() is now protected visibility
Fixes: 212882845
Test: SearchViewTest
Change-Id: I6cce0f178402b8952f2510fb2369d5e845bdf9a5
M appcompat/appcompat/api/restricted_current.txt
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/SearchView.java
M appcompat/appcompat/api/current.txt
M appcompat/appcompat/api/public_plus_experimental_current.txt
Description
Component used: androidx.appcompat.widget.SearchView
Version used: 1.4.0
Devices/Android versions reproduced on: Android 10+
Feature request: There are methods available in the
SearchView
class to override some of its suggestions behaviour (e.g. withsetOnSuggestionListener()
I modify what happens when a suggestion is clicked), but I need a method to override what happens when you click the query refinement icon (thevoid onQueryRefine(CharSequence queryText)
method), for example with asetOnQueryRefineListener()
method.It is not possible to subclass
SearchView
and override it since the method is package-private.