Reputation: 24500
I m making book finder app. step1: i clicked on search button and activity is waiting for my book title
step2: i input some book title
step3: the focus still stays on this search button, i have to click on screen to make it go away.
is there way to automatically loose focus on last widget i clicked on?
Upvotes: 1
Views: 1621
Reputation: 6109
You probably just want to call requestFocus()
on your book list whenever a search completes (however, if there are no results, you may want to re-open your search box, or do so after a delay). There is also a OnFocusChangedListener
which might be of help if requesting focus on your list after serving up results does't work for some reason.
Upvotes: 2