Problem with overflow menù

Put your problem here if it does not fit any of the other categories.

Problem with overflow menù

Postby Paolo86 » Tue Jan 08, 2013 5:35 pm

Hi, I have a problem with an overflow menù, one year ago I developed an application and works fine on my htc hero where there was an hardware menù button.
Last week I changed my device (nexus) and Jelly bean shows me the overflow menù in the top-right corner of the aplication but I cant'see my old menù-voices.
If i tap the overlow I can see only the main activity menù (auto created by eclipse with the dummy voice "settings" ) that extends a tabactivity.
Can someone help me please?

here is the code of the main activity:
Code: Select all
public class MainActivity extends TabActivity {

    public void onCreate(Bundle savedInstanceState) {
        TabHost tabHost = getTabHost();
        // Tab for Photos
        TabSpec photospec = tabHost.newTabSpec("Inserisci");
        // setting Title and Icon for the Tab
        photospec.setIndicator("Inserisci", getResources().getDrawable(R.drawable.inserimento));
        Intent photosIntent = new Intent(this, Inserimento.class);

        // Tab for Songs
        TabSpec songspec = tabHost.newTabSpec("Prezzi");
        songspec.setIndicator("Prezzi", getResources().getDrawable(R.drawable.prezzi));
        Intent songsIntent = new Intent(this, Prezzi.class);

        // Tab for Videos
        TabSpec videospec = tabHost.newTabSpec("Cerca");
        videospec.setIndicator("Cerca", getResources().getDrawable(R.drawable.visualizza));
        Intent videosIntent = new Intent(this, Visualizza.class);

        // Adding all TabSpec to TabHost
        tabHost.addTab(photospec); // Adding photos tab
        tabHost.addTab(songspec); // Adding songs tab
        tabHost.addTab(videospec); // Adding videos tab
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(, menu);
        return true;

and this is the other class where I have the munù voices that I don't see anymore

Code: Select all
public class Visualizza extends FragmentActivity implements AlertDialogFragment.NoticeDialogListener,Data2.OnMyListFragmentItemClick
private GregorianCalendar calendar;
         private int mese,anno;
         private static final int MENUITEM_COMANDO_1 = 1;
         private static final int MENUITEM_COMANDO_2 = 2;
         private static final int MENUITEM_COMANDO_3 = 3;
         private static final int MENUITEM_COMANDO_4 = 4;
         private static Database databaseHelper;
         private static SQLiteDatabase db;
         private DialogFragment alertDialog;
         private ListView listView;
         private DialogFragment newFragment;
    public void onCreate(Bundle savedInstanceState)
        listView = (ListView) findViewById(;
        calendar = new GregorianCalendar();
        databaseHelper = new Database (this);

    public void onResume()
    public void onCreateContextMenu(ContextMenu menu, View v,ContextMenuInfo menuInfo)
        super.onCreateContextMenu(menu, v, menuInfo);
        menu.add(0, DELETE_ID, 0, "Cancella");
    public boolean onContextItemSelected(MenuItem item)
        switch(item.getItemId()) {
            case DELETE_ID:
                AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
                db = databaseHelper.getReadableDatabase();
                databaseHelper.deleteNote(getIdToDelete(, db);
                return true;
        return super.onContextItemSelected(item);
    public boolean onCreateOptionMenu(Menu menu) {
        menu.add(Menu.NONE, MENUITEM_COMANDO_1, 1, this.getResources().getString(R.string.visualizzaTutto));
                menu.add(Menu.NONE, MENUITEM_COMANDO_2, 2, this.getResources().getString(R.string.scegliMese));
            menu.add(Menu.NONE, MENUITEM_COMANDO_4, 4,this.getResources().getString(R.string.calcolaSpese));
        return true;

I hope that my english is good enough
thank you in advance
Once Poster
Once Poster
Posts: 1
Joined: Tue Jan 08, 2013 5:15 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 29 guests