I'm working with two fragments that I'm setting on the Tabs.
I have two issues:
here's the code to add fragment and set its title
ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());
adapter.addFragment(new OneFragment(), "Current\nSubscription");
Try this set Your TabLayout
title using below code
TextView tabOne = new TextView(this);
tabOne.setText("Current"+ System.getProperty("line.separator") +"Subscription");
tabOne.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.ic_tab_favourite, 0, 0);
tabLayout.getTabAt(0).setCustomView(tabOne);