title: Android ActionBar Menupoint ( with 3 Dots)
body: <p>I wanted to implement the ActionBar (Android 4.0) in a test App to see how it works etc. </p>
  
  <p>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: <a href="http://cdn.gottabemobile.com/wp-content/uploads/2011/12/ICS-Screen05.jpg" rel="noreferrer">http://cdn.gottabemobile.com/wp-content/uploads/2011/12/ICS-Screen05.jpg</a>)</p>
  
  <p>How can I implement this on my App? </p>
  
  <p>I tried to implement this "menuButton" with ah Spinneradapter.. but this one always displays after the App Name in the ActionBar. </p>
  
  <p>Btw. Another question: 
  I have a refresh button in my App.. how can i make the "Refresh-Icon" spin, whenever its clicked?</p>
  
  <p>Here is my Code...</p>
  
  <p>Thanks for the Help, and please excuse my programming skills... i am a newbie! :)</p>
  
  <pre><code>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;}}
  </code></pre>
  
  <hr>
  
  <p>XML ActionBar</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
  
  &lt;item android:id="@+id/menu_refresh"
      android:icon="@drawable/ic_popup_sync_1"
      android:showAsAction="always"/&gt;
  
  &lt;item android:id="@+id/menu_settings" 
      android:icon="@drawable/ic_menu_preferences"
      android:showAsAction="always"/&gt;&lt;/menu&gt;
  </code></pre>