How to get the Google Now searchbar into my app? - android

Google has just implemented their searchbar from Google Now into the play store application as you can see in the gif below.
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

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:

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.

Related

Material Design Bottom Button in SwipeRefreshLayout

Look at the following example Layout from Gmail:
There is a button at the bottom of the listview with a pen as icon.
How can I create such a button?
Well it is called "FloatingActionButton", search it on GitHub you will get lots of library, for example:
https://github.com/makovkastar/FloatingActionButton
https://github.com/futuresimple/android-floating-action-button
That is very simple you just need to use ImageButton

Flickr-like Android ActionBar

I have been doing a small research on UI designs for Android for the last few weeks. My main concern right now is the action bar along with tabs. I believe the default android implementation takes to much room on the screen.
Recently I took a look at the Flickr app and I really like how they do this but I am not sure how to implement tabs this smoothly inside the action bar itself.
All help / ideas are appreciated.
Thanks in advance.
Screenshot of the action bar can be found here:
https://dl.dropboxusercontent.com/u/242865/Screenshot_2014-11-11-11-04-05.png
Check out this library on github.
It's an Android Library to help you create actionbar tabs like Capitaine train app by Cyril Mottier.
You have to set a customview in your actionbar and use something like ViewPagerIndicator
http://viewpagerindicator.com/
To setup a custom view in your actionbar just use setCustomView but remember to enable the display of custom view first.
Take a look at this
http://www.jfarrell.net/2013/10/customizing-action-bar-in-android.html

Scrolling in ActionBar title-android

How can I create an Actionbar title with scrolling where clicking on a particular title item moves to the corresponding page?
You can see this functionality in Google Drive app in android mobile phones:
You could create a custom actionBar with a textView for the title that has:
android:scrollHorizontally="true"
That should get the desired effect.
I have created a library called Veni Divi that provides you with a custom action bar title that behaves like the one from Google Drive app.
In case someone needs this functionality, the source is available on GitHub.
You may see a demo app on Google Play.

In Android, how can I display an overflow like menu when button is clicked?

I am working on an android app and I want to make a button display a certain menu when clicked. For example, the google play music app has a overflow icon next to each icon, and when clicked, you are presented with a list of choices. How can i accomplish something liks that? http://i.stack.imgur.com/TZ3fU.png
Android Developer Guide has a tutorial:
http://developer.android.com/guide/topics/ui/menus.html#FloatingContextMenu
Also, given the situation, you might want this:
http://developer.android.com/guide/topics/ui/menus.html#PopupMenu
You can also use the Spinner widget. In case you are using Sherlock, you can use
If you want it backported you can use the v7 version of popupmenu
https://developer.android.com/reference/android/support/v7/widget/PopupMenu.html

Android Actionbar

I have a pretty simple question about the Android ActionBar... is this intended to be present in the app, to use as a sort of header, or is it only intended to show when the user hits the setting button on the device?
I'm trying to implement a menu that is always present in the app, like a logo for branding, and some other actions, like a search icon and perhaps a map icon to see the map functionality. Any suggestions? Also see this post here
The ActionBar is always displayed. Check out the Android Developer Site for more information on the ActionBar UI patterns and usage.
You can use the excellent ActionBarSherlock library to provide an ActionBar on 2.x devices.
The ActionBar sounds perfect for the branding/icons you want. You would use your logo as the icon, and then have Action Items for Search and Map functionality.
Have you put your android:targetSdkVersion to 11 or more ? ActionBar is available only for Honeycomb and ICS :)

Categories

Resources