ActionBar with action times but no title

127 views
Skip to first unread message

Matt Reilly

unread,
Mar 11, 2012, 9:48:39 PM3/11/12
to actionba...@googlegroups.com
Great library!

Any idea how to duplicate the functionality that is found throughout the people app? The action bar is simply two buttons. I guess I could remove the action bar completely and do my own thing, but I was wondering if ABS had this function.
Untitled-1.png

Carlos Silva

unread,
Mar 11, 2012, 11:11:23 PM3/11/12
to actionba...@googlegroups.com
Sure, just use "showInActionBar = never"

Matt Reilly

unread,
Mar 11, 2012, 11:22:33 PM3/11/12
to actionba...@googlegroups.com
Doesn't seem to make any difference in my app... It just stays in the regular spot?

Jake Wharton

unread,
Mar 12, 2012, 12:43:04 AM3/12/12
to actionba...@googlegroups.com

That is an action mode as far as I can tell. Have a look at the action mode example in the demos sample app. Try it with the light theme and you should get almost exactly what you have in that picture.

Matt Reilly

unread,
Mar 12, 2012, 1:15:31 AM3/12/12
to actionba...@googlegroups.com
Thanks Jake! Always appreciated.

Matt Reilly

unread,
Mar 12, 2012, 2:30:14 AM3/12/12
to actionba...@googlegroups.com
Just an update here.

Looks like google creates a custom view for the actionbar. If anybody is interested, the source code for the calendar app has a good example:

https://github.com/android/platform_packages_apps_calendar/blob/master/src/com/android/calendar/event/EditEventFragment.java

:)

Joshua Rabanal

unread,
Nov 28, 2014, 6:31:44 PM11/28/14
to actionba...@googlegroups.com
you can change the check mark with :
getActionBar().setHomeAsUpIndicator(resId)
getActionBar().setDisplayHomeAsUpEnabled(true);
getActivity().setTitle("Done");

and then listen for it being clicked in your  onOptionsItemSelected with the id of : android.R.id.home

Reply all
Reply to author
Forward
0 new messages