I had been developing Android applications, but I don't know much about 4+ versions of Android well. Therefore, please help me - I have made Android application with tabs for navigation:
final ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
But I also need to add dropdown menu to ActionBar for other goals. Can I do it? Please, if it's possible, give me an example. Thank you in advance.
You can use something called an android spinner. It looks like this:

You can customize it in many ways to suit your apps design too.
Here's a great tutorial by Google on how to use these:
http://developer.android.com/guide/topics/ui/controls/spinner.html
If you want to add this to an action bar, you can do it via a spinner adapter as detailed here: http://developer.android.com/guide/topics/ui/actionbar.html#Dropdown
If you want to add icons to do certain actions, then you can see this: http://developer.android.com/guide/topics/ui/actionbar.html#ActionItems
If you want to do certain actions in the bar itself (like search in the google search app) then see this: http://developer.android.com/guide/topics/ui/actionbar.html#ActionView
If you want to add navigation tabs, then see this: http://developer.android.com/guide/topics/ui/actionbar.html#Tabs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With