Android SlidingTabLayout with icons

Just want to give example for the Correct and accepted answer. 🙂 Firstly, add the tabs and set their custom view when you are adding the adapter to your viewpager. For example see following lines: mViewpager = (ViewPager) view.findViewById(R.id.pager); //Do something with your view before setting up adapter ViewPager.setAdapter(mSectionsPagerAdapter); mSlidingTabLayout = (SlidingTabLayout) View().findViewById(R.id.sliding_tabs); mSlidingTabLayout.setCustomTabView(R.layout.custom_tab_title, R.id.tabtext); … Read more