Android Contextual Action Bar - Select all / Deselect all - android

I'm looking for a way to implement a drop down on a contextual action bar, that shows the number of items selected, then has a drop down for either Select all or Deselect all. The standard Gallery app has this.
Is the only way to do it, to create a custom view to replace the title, or is there a simpler way? If you need to call
setCustomView
and replace the title, what's the best way of doing this. Would a Popup Menu be suitable. I want it to follow the same style as the contextual action bar for things like touch feedback, colours and the small arrow indicating their are more options.
Thanks.

Related

How to modify OS contextual action bar for text selection in EditText?

When selecting text in EditText menu appears with some predefined options like Copy, Cut or Paste. I know that I can extend this menu with some custom actions for particular EditText in my app but my question is:
Is it possible to add option to this predfined OS menu so that it will be available to all applications ?
See this page regarding how to use the contextual action mode: http://developer.android.com/guide/topics/ui/menus.html#CAB

Alternative to Android Action Bar using buttons or radio group

I would like to create an simple menu type Action Bar along the top. I like using buttons, but need the color or image to change and hold when on selected link. Or else, could a radio button be used as an alternative to Action Bar? I would like it to look like the menu tabs on this screenshot link: view link hereThank you!

Android clickable Custom Action Provider

I'm using ActionBarSherlock and creating a custom ActionProvider. When clicking on the custom action provider, I've managed to make the topmost LinearLayout clickable and set a custom selector on it.
The problem is that compared to simple menu item with an icon, the custom action provider doesn't use the selector to highlight the action bar entirely from top to bottom. A few pixels on top and bottom are not being highlighted.
There is probably an elegant solution to make the entire custom action provider behave like a simple clickable menu item with an icon. Any help will be greatly appreciated.
I figured it out. Instead of using an Action Provider, I used the actionLayout for the menu item and made it clickable as shown in this post.

Action bar option items menu icon

Does anyone know how to add "menu" text under the dots menu icons in action bar?
Also, how can I make my option menu items to display the icon in Android 4.0?
You can't add text under the default menu icon in the 4.0 Action bar, you do however have two alternatives
1) You can create your own icon that includes the text 'Menu' (Unfavourable)
2) Create a custom menu item with the dots image and the properties so that the text appears next to it.
android:showAsAction="always|withText"
Take a look at The Android SDK Documentation on Action Bar to see how to create custom items and make them perform tasks.

List item long press (Android 4.0, Contextual action bar)

I have a ListView in my app and I want to show contextual action bar on a long press gesture like in design best practices for ICS
http://developer.android.com/design/patterns/selection.html
is there any default way to do that? Or i need to write my own custom action bar?
so, I think here's a good tutoiral:
http://www.vogella.com/articles/Android/article.html#tutorial_contextualmenu
and the very good one is here
http://developer.android.com/guide/topics/ui/menus.html

Categories

Resources