Update suggestion/support UI to use more negative space.

Bug: 28435214

-- Tweaked layout and padding in suggestions and support tab.
-- Added support to show different text color in SlidingTabLayout.

Change-Id: If5d90ec5360e35565176aae7475e355c27fcef7c
This commit is contained in:
Fan Zhang
2016-05-04 17:33:25 -07:00
parent 28c44ebf65
commit 50cde75ef7
14 changed files with 162 additions and 104 deletions

View File

@@ -120,9 +120,7 @@ public final class SlidingTabLayout extends FrameLayout implements View.OnClickL
tabTitleView.setOnClickListener(this);
mTitleView.addView(tabTitleView);
if (i == mViewPager.getCurrentItem()) {
tabTitleView.setSelected(true);
}
tabTitleView.setSelected(i == mViewPager.getCurrentItem());
}
}
@@ -159,9 +157,9 @@ public final class SlidingTabLayout extends FrameLayout implements View.OnClickL
if (mScrollState == ViewPager.SCROLL_STATE_IDLE) {
onViewPagerPageChanged(position, 0f);
}
final int titleCount = getChildCount();
final int titleCount = mTitleView.getChildCount();
for (int i = 0; i < titleCount; i++) {
getChildAt(i).setSelected(position == i);
mTitleView.getChildAt(i).setSelected(position == i);
}
}
}