-1

In my app when the virtual keyboard appears it is pushes up my menu from the bottom, and it is not so nice and it is also cover some of the content so i just hide it when the virtual keyboards shows up.

But when i press back to hide the keyboard, i want to show my menu again, but nothing happens, except the virtual keyboard disappears like default.

I tried:

        @Override
        public void onBackPressed() 
        {
            LinearLayout menuLayout = (LinearLayout)findViewById(R.id.menuLayout);
            menuLayout.setVisibility(View.VISIBLE);

            super.onBackPressed();
        }

also tried WITHOUT:

super.onBackPressed();

None of them worked.

Any suggestions ?

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

1 Answers1

-1

You should not override onBackPressed method. See here how to resolve your problem

Community
  • 1
  • 1
pleerock
  • 18,322
  • 16
  • 103
  • 128
  • "You should not override onBackPressed method" -> this is not true... http://developer.android.com/training/implementing-navigation/temporal.html#back-webviews In many aspects your right, but not in general.. – Martin Pfeffer Mar 14 '15 at 02:50