Is there a way to clear the text in the ListView Filter?
I can see there are properties for changing the filter text size, filter text color, and a bunch of other stuff. There does not seem to be a way to clear the ListView Filter text.
When returning from a different screen, after a possible database update where the elements of the list view could possibly have changed, regenerating the elements list, there may still be text left over in the filter that is not applied to the list. Is there any way to clear that text?
At first it shows Screen1 with a ListView with filter bar populated with the two items of a database.
I type in “new” into the filter and it changes the display to show only the second record.
I then hit my “Edit” button and it changes to the detail view on Screen2.
On Screen2 I click my “Save” button to return to Screen1.
Notice the filter text still shows “new”. Also notice that it now again shows both items of the database (I have re-created the list elements) not applying the filter to the displayed list.
Thanks. I gave that a try, closing Screen1 when I “open another screen” for Screen2.
It does work, the filter text ends up being cleared, but there are artifacts of doing this:
On Screen2 I have to also “open another screen” to get back to Screen1. I can no longer use the “close screen” block to return.
In closing Screen1 I lose other variables that have been set on that screen and it seems like controls (such as the ListView) are reinitialized. The first time an element is selected on a newly initialized ListView It seems to take an extra second or so to “select” that element.
“Stacking” screens is the way Android seems to have intended. You “open” a new screen and “return to” the previous screen. Look at the Chrome browser on Android. When you close a page it returns the previous page (each page is probably implemented as an activity). Apps in general – when you close an app it returns to the previous app.
It seems to me the real solution is to offer a way to set or clear the text in the filter of a ListView. The code that is run internally for the control then needs to run to implement the filtering change of the ListView.