I am using Google\'s SlidingTabLayout. As i only have 3 tabs to be displayed, I am seeing empty space after last tab.
Please screenshot below.
in SlidingTabLayout.java
under the following method, just before the return statement:
protected TextView createDefaultTabView(Context context)
I added these lines to that method:
final PagerAdapter adapter = mViewPager.getAdapter();
LinearLayout.LayoutParams param = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, 1.0f / adapter.getCount());
textView.setLayoutParams(param);
that is very close to the answer marked as the solution for the question, however I did not have to use the window manager.