title: Changing text Size of menu item in android
body: <p>I am using simple menu items in action bar by using following code in main activity:</p>
  
  <pre><code>    package com.kaasib.ftpclient;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.app.ActionBar;
  
  
  public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item){
          boolean ret;
          if(item.getItemId() == R.id.connection_manager){
              ret = true;
          }else{
              ret = super.onOptionsItemSelected(item);
          }
  
          return ret;
      }
  }
  </code></pre>
  
  <p>Here is menu xml in main.xml:</p>
  
  <pre><code>    &lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
      &lt;item
          android:id="@+id/connection_manager"
          android:orderInCategory="100"
          android:showAsAction="collapseActionView"
          android:title="@string/connection_manager"
          android:textSize="2sp"
          /&gt;
  
  &lt;/menu&gt; 
  </code></pre>
  
  <p>It is working except it is not making any change to text size. Right now text size for menu item is bigger while I want font size to be smaller. So what am I doing wrong?  Shouldn't <code>android:textSize</code> attributute work? Or is there some other way to do so? I believe that text size should be set from XML not from java as it is design related thing. Any suggestion?</p>