MaterialViewPager icon indicating copy to clipboard operation
MaterialViewPager copied to clipboard

MaterialViewPager full tab text (full width)

Open r4hulp opened this issue 8 years ago • 4 comments

Hi,

First of all, thanks for this wonderful library. I am totally loving working on it. However I have one issue.

I have five tabs, some of them are little longer. But I purposely want to show full name of theirs. Right now the pager titles are getting truncated and replaced with ... (e.g. Professionalism with Prof...).

I could not find any setting that forces tab to be of full text / width.

Any help would be great.

r4hulp avatar Jul 16 '17 15:07 r4hulp

Please help on this I am facing the same issue.

vivekkumar12hpe avatar Jul 22 '17 21:07 vivekkumar12hpe

In material_view_pager_pagertitlestrip_standard layout you are using set android:layout_width to wrap_content.

You can access material_view_pager_pagertitlestrip_standard from activity_main.xml press CTRL and click on app:viewpager_pagerTitleStrip="@layout/material_view_pager_pagertitlestrip_standard" title

sonimusaj avatar Jul 24 '17 22:07 sonimusaj

Same problem here. The solution was to create a tab bar, just like in the description https://github.com/florent37/MaterialViewPager#or-create-your-own-tab-bar

and then put the app:pstsPaddingMiddle="false"

ricardocatarinoaltran avatar Aug 01 '17 22:08 ricardocatarinoaltran

The solution was to create a tab bar,and make "app:pstsShouldExpand" to false,NOT make "app:pstsPaddingMiddle" to false.

You can see the PagerSlidingTabStrip source code like this: mTabLayoutParams = isExpandTabs ? new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1.0f) : new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT);