Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7074275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:02:04+00:00 2026-05-28T06:02:04+00:00

I wanted to implement the ActionBar (Android 4.0) in a test App to see

  • 0

I wanted to implement the ActionBar (Android 4.0) in a test App to see how it works etc.

My question: Almost every App for 4.0 have on the right corner of the ActionBar a “menuButton” with a Icon that shows 3 vertical Dots.
(See: http://cdn.gottabemobile.com/wp-content/uploads/2011/12/ICS-Screen05.jpg)

How can I implement this on my App?

I tried to implement this “menuButton” with ah Spinneradapter.. but this one always displays after the App Name in the ActionBar.

Btw. Another question:
I have a refresh button in my App.. how can i make the “Refresh-Icon” spin, whenever its clicked?

Here is my Code…

Thanks for the Help, and please excuse my programming skills… i am a newbie! 🙂

public class IVOAppActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ActionBar actionBar = getActionBar();

    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);

    SpinnerAdapter mSpinnerAdapter = ArrayAdapter.createFromResource(this, R.array.action_list,
        android.R.layout.simple_spinner_dropdown_item);

    actionBar.setListNavigationCallbacks(mSpinnerAdapter, null);

    setContentView(R.layout.main);
}


/** Create ActionBar */
public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.menubar, menu);
    return true;
}

/** Handle clicks on ActionBar */
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {

    case R.id.menu_refresh:
        Toast.makeText(this, "Fake Refreshing..", Toast.LENGTH_SHORT).show();
    /*final Intent i = new Intent(this, Help.class);
    startActivity(i);*/
    break;
    case R.id.menu_settings:
        Toast.makeText(this, "Settings", Toast.LENGTH_SHORT).show();
    /*final Intent ii = new Intent(this, Options.class);
    startActivity(ii);*/
    break;


} return false;}}

XML ActionBar

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >


<item android:id="@+id/menu_refresh"
    android:icon="@drawable/ic_popup_sync_1"
    android:showAsAction="always"/>

<item android:id="@+id/menu_settings" 
    android:icon="@drawable/ic_menu_preferences"
    android:showAsAction="always"/></menu>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:02:04+00:00Added an answer on May 28, 2026 at 6:02 am

    How can I implement this on my App?

    Have an options menu, with items that are not hoisted into the action bar as toolbar buttons and the like. Since you elected to make your own two options menu items have android::showAsAction="always", they will be toolbar buttons, leaving you with nothing for the spillover menu.

    Note that you will only see the three-dots button on devices that lack an off-screen MENU button.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i wanted to implement charts in my silverlight app. i have installed SL4 in
I have an ImageView for which I wanted to implement the onClickListener. But when
I wanted to implement an app that prevents calls like a firewall. When I
i am newbie to android, I wanted to implement dynamically JSON data to my
I wanted to implement a file search function in my Android application and I
I wanted to implement python com server using win32com extensions. Then consume the server
I wanted to implement the game Pacman. For the AI, I was thinking of
Let's say you wanted to implement a breadth-first search of a binary tree recursively
Since this function is implemented in IE8, I wanted to see exactly what I
Wanted to get some consensus around a UI feature I'm working on right now.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.