Remove Title from menu bar

Asked

Viewed 179 times

1

Can anyone tell me how to remove the title from the menu bar? I saw some materials on the internet but all teach to remove the bar and I just want to remove the title.

  • You mean the Toolbar, the top bar where the app name is?

  • Yes. That’s right.

1 answer

1


Try this

Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setTitle("");

Or so

Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayShowTitleEnabled(false);
  • Perfect! Gave straight! Thank you very much... saved my night!

  • I’m happy to help =) Mark my answer as the correct one, it helps me.

  • I think I did. Check it out. I’m new here. :)

  • Yes, thank you! This gives a motivation. Welcome! See https://answall.com/tour

Browser other questions tagged

You are not signed in. Login or sign up in order to post.