how to use Obtion menu in two class
<p>Hi i have Use Menu in 2 class  this is my Menu code:</p>

<pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;

    &lt;item
        android:id="@+id/setting"
        android:icon="@drawable/ic_seting"
        android:title="Setting"&gt;
    &lt;/item&gt;
 &lt;/menu&gt;
</code></pre>

<p>in class A i have use this </p>

<pre><code>@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater menuInflater = getMenuInflater();
        menuInflater.inflate(R.menu.options, menu);
        return true;
    }

public boolean onCreateOptionsMenu(MenuItem item) {
    // TODO Auto-generated method stub
    switch (item.getItemId()) {
    case R.id.SavedList:

        Intent intent = new Intent(

        A.this,

        SetPreference.class);

        startActivity(intent);

        return true;

}
return true;
}
</code></pre>

<p>and in class b i have use </p>

<pre><code>@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater menuInflater = getMenuInflater();
        menuInflater.inflate(R.menu.options, menu);
        return true;
    }


public boolean onCreateOptionsMenu(MenuItem item) {
    // TODO Auto-generated method stub
    switch (item.getItemId()) {
    case R.id.SavedList:

        Intent intent = new Intent(

        b.this,

        SetPreference.class);

        startActivity(intent);

        return true;

}
return true;
}
</code></pre>

<p>in one class b its working fine but in class its not working please tell me where i m doing wrong please help me i am new n android </p>
