1

I've an app that i've been developing for around 6 months. It uses an options menu on some of the screens. It has always worked until i updated eclipse from api ~14 to 17. I also updated the tools as well.

The options menu is no longer present can anyone tell me why? Is there something i have to do differently in api 17?

Here's the optionsmenu that logs the user into the app.

@Override
    public boolean onCreateOptionsMenu(Menu menu) {

        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.layout.menuentryoptionsmenu, menu);

        if(isAllowChangeUser.equalsIgnoreCase("false")){
            MenuItem mi = menu.findItem(R.id.changeuser);
            mi.setVisible(false);
        }
        return true;

    }



    @Override
    public boolean onOptionsItemSelected(MenuItem item) {

        Cursor allFromCompIdTable = nfcscannerapplication.loginValidate.queryAllFromCompanyIdTable();

        if(allFromCompIdTable.getCount() > 0){

            if(allFromCompIdTable.moveToLast()){

                compId = allFromCompIdTable.getString(allFromCompIdTable
                        .getColumnIndex(LoginValidate.C_COMPANY_ID_OUTSIDE_APP_PURPOSES));

            }

        } 

        if(isAllowChangeUser.equalsIgnoreCase("false")){
            if(item.getItemId() == R.id.changeuser)
            item.setVisible(false);
            }

       switch (item.getItemId()) {


        case R.id.login:

            //if(gpsStatusStopped == true){

                Log.e(TAG, "gps engine has stopped now");


            .........
turtleboy
  • 8,210
  • 27
  • 100
  • 199
  • I had same problem, maybe try to compile agains api level 11. in api 17 there are some unconvienced features with some device without hardware buttons, this could do the mess. – Adam Varhegyi Mar 05 '13 at 10:53
  • @AdamVarhegyi brilliant just the job, if you make an answer i'll accept. thanks – turtleboy Mar 05 '13 at 11:47

1 Answers1

1

I had same problem, maybe try to compile agains api level 11. in api 17 there are some unconvienced features with some device without hardware buttons, this could do the mess.

Adam Varhegyi
  • 11,307
  • 33
  • 124
  • 222