Answers for "hide top bar android"

1

hide the title bar android studio

getSupportActionBar().hide();
Posted by: Guest on November-27-2020
0

how to hide menu items in android

//anywhere in your code
...
mState = HIDE_MENU; // setting state
invalidateOptionsMenu(); // now onCreateOptionsMenu(...) is called again
...

@Override
public boolean onCreateOptionsMenu(Menu menu)
{
    // inflate menu from xml
    MenuInflater inflater = getSupportMenuInflater();
    inflater.inflate(R.menu.settings, menu);

    if (mState == HIDE_MENU)
    {
        for (int i = 0; i < menu.size(); i++)
            menu.getItem(i).setVisible(false);
    }
}
Posted by: Guest on October-02-2021
-2

removing title bar from android app

res -> values -> styles.xml
<item name="windowNoTitle">true</item>
Posted by: Guest on September-02-2020

Browse Popular Code Answers by Language