Reputation: 2385
So I have a TabLayout
that is inside a Toolbar
. I wanted to remove the overflow menu (three dots) so I commented out the onCreateOptionsMenu
and onOptionsItemSelected
methods that were auto-generated, to remove the icon (is this the proper way anyway?). Now there is a bit of a margin on the left side of the TabLayout
. Here is a pic for reference: http://prntscr.com/8gf4c3
I have tried adding a negative margin to the TabLayout
but that did not seem to work. I'd like the TabLayout
to completely fill the Toolbar
.
Any ideas?
Upvotes: 2
Views: 1071
Reputation: 6703
To remove the left part, just use toolbar.setContentInsetsRelative(0, 0);
If you want to do the same but for xml, use android:contentInsetStart/Left="0dp"
Upvotes: 5