Perform automatically a search after 500 milliseconds #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check all that apply to this PR using "x":
PR Type
What kind of change does this PR introduce?
Fixes
Issue Number: #1
What is the current behavior?
User must explicitly request app to perform the search
What is the new behavior?
App will perform the search request automatically after text had been changed and half a second had elapsed
Other information
The initial text has also been changed as requested on Alpha bug meta-issue. As it is semantically different from the old -original one, it has been renamed and translations has been removed so translators see there is a new string to be translated.
The request is performed after 500 milliseconds had elapsed. I tried with 300 milliseconds but it looked too much automatic; trying with 1 second was ok but maybe a little too slow. Some other values could also be tested, but current one seems ok to me.
Search fragment has also been simplified. It is now using ConstraintLayout, so RelativeLayout is no longer needed; labels shown when there is no query or there are no results are now using the same TextView. This simplifies the layout without making code more difficult, as there are just a few places where that TextView was needed.