7

Google has just implemented their searchbar from Google Now into the play store application as you can see in the gif below.

google searchbar in action

How can I implement this actionbar searchbar into my own app? I'd like to have the

  • style
  • hamburger animation
  • acess from toolbar button
  • microphone button
  • ripple effect on lollipop devices

What I already have is

  • the layout for a list item
  • the "old" searchview inside the actionbar

Any ideas? thanks in advance

Brian
  • 1,318
  • 1
  • 16
  • 33

2 Answers2

7

I created this library to do this, the only thing it does not do is the ripples, but I expect you could implement them quite easily with other resources:

https://github.com/Quinny898/PersistentSearch

Here's a gif of its use:

Use

Kieron
  • 1,982
  • 2
  • 18
  • 17
  • I would +1 if it was uploaded to Maven! – Marcus Mar 18 '15 at 20:38
  • 1
    @Quinny898: Does it need compile 'com.balysv.materialmenu:material-menu:1.x.x' ? to work on... – Muralidharan Kathiresan Mar 20 '15 at 16:27
  • 1
    For those of us that need to get searchables from the internet, this is terrible to use. All searchables need to be specified beforehand, so it appears impossible to update the list as the user types. On top of that, the inability to simply set the search results yourself for a given query is extremely annoying. – lrAndroid May 02 '15 at 21:37
  • You also cannot place it to tab bar, because when you navigate back with the search bar active, it gives exception. https://github.com/Quinny898/PersistentSearch/issues/67 – Sermilion Jan 12 '16 at 12:33
-3

for that you need to use material search bar. Below is link for github.

Please download code. https://github.com/ManuelPeinado/GlassActionBar https://github.com/ManuelPeinado/GlassActionBar/tree/master/samples-stock

And modify this code as you want. it will help.

Yogendra
  • 4,817
  • 1
  • 28
  • 21
  • This points to a repo that has an implementation of material in the toolbar/appbar, but doesn't specify or advise on how to create the inset auto-complete persistent search bar. – Steven Mar 17 '15 at 23:25