Update tabs
This commit is contained in:
parent
2d20d569d5
commit
c70103ba60
1 changed files with 3 additions and 2 deletions
|
@ -177,6 +177,7 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
|
||||||
//In case we have the padding they must be equal so we take the biggest
|
//In case we have the padding they must be equal so we take the biggest
|
||||||
padding = Math.max(paddingLeft, paddingRight);
|
padding = Math.max(paddingLeft, paddingRight);
|
||||||
|
|
||||||
|
|
||||||
// get custom attrs
|
// get custom attrs
|
||||||
a = context.obtainStyledAttributes(attrs, R.styleable.PagerSlidingTabStrip);
|
a = context.obtainStyledAttributes(attrs, R.styleable.PagerSlidingTabStrip);
|
||||||
tabTextColor = a.getColor(R.styleable.PagerSlidingTabStrip_pstsTextColor, underlineColor);
|
tabTextColor = a.getColor(R.styleable.PagerSlidingTabStrip_pstsTextColor, underlineColor);
|
||||||
|
@ -373,12 +374,12 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||||
if (isPaddingMiddle || padding > 0) {
|
// if (isPaddingMiddle || padding > 0) {
|
||||||
//Make sure tabContainer is bigger than the HorizontalScrollView to be able to scroll
|
//Make sure tabContainer is bigger than the HorizontalScrollView to be able to scroll
|
||||||
tabsContainer.setMinimumWidth(getWidth());
|
tabsContainer.setMinimumWidth(getWidth());
|
||||||
//Clipping padding to false to see the tabs while we pass them swiping
|
//Clipping padding to false to see the tabs while we pass them swiping
|
||||||
setClipToPadding(false);
|
setClipToPadding(false);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (tabsContainer.getChildCount() > 0) {
|
if (tabsContainer.getChildCount() > 0) {
|
||||||
tabsContainer
|
tabsContainer
|
||||||
|
|
Loading…
Reference in a new issue