I am working on Tablayout with text and icon from the following tutorial ..
My question is how to make the icon placed next to the text instead of above them? I am n
Another solution is setting the app:tabInlineLabel="true"
in your activity .xml or call the TabLayout method setInlineLabel(true)
.
Source
It's easy.
Tab tab = tabLayout.newTab();
tab.setCustomLayout( R.layout.whatever );
tabLayout.addTab(add);
Your layout would be a simple TextView
with a drawableRight
that specifies your icon.
For more: http://panavtec.me/playing-with-the-new-support-tablayout/