Search for editText animations as a Chrome app

I am trying to do an editText search in the middle of the screen,

To move with animation on searchView on the toolbar with each click.

Just like you can find on the new chrome app (v46) tab for android.

Didn't find any Github example, so any idea how to implement it?

enter image description here

+5
source share
1 answer

I created the gist to show one way this can be done: https://github.com/orenothnay/SearchBar

The main component is FocusableEditText (which I adapted from the viewview androids widget). It uses a workaround so that the edit text loses focus when the user removes the keyboard. and then you just listen to the focus change event and change your interface accordingly.

Caveats: this should be wrapped in focus stealing the ViewGroup, and it should be offered to clear focus on pause (otherwise the keyboard stays up).

+5
source

Source: https://habr.com/ru/post/1237059/


All Articles