I\'m pretty new to android development. So bear with me.
I\'ve been trying to align the icon and text in same line in com.android.support:design:23.1.0
Thank you Atu for this good tip!
In my case, I have to add a linear layout to center tablayout title. I have also added some space characters to get margin between the icon and the text.
custom_tab.xml:
Initialization code:
LinearLayout tabLinearLayout = (LinearLayout) LayoutInflater.from(this).inflate(R.layout.custom_tab, null);
TextView tabContent = (TextView) tabLinearLayout.findViewById(R.id.tabContent);
tabContent.setText(" "+getApplicationContext().getResources().getString(tabTitles[i]));
tabContent.setCompoundDrawablesWithIntrinsicBounds(tabIcons[i], 0, 0, 0);
mTabLayout.getTabAt(i).setCustomView(tabContent);