|
|
@@ -27,10 +27,10 @@ import static com.android.chmo.R.id.pager;
|
|
|
*/
|
|
|
|
|
|
public class HomeFragment extends BaseFragment {
|
|
|
- private final int PAGE_FOLLOW = 0;
|
|
|
+ private final int PAGE_FOLLOW = 0;
|
|
|
private final int PAGE_RECOMMEND = 1;
|
|
|
- private final int PAGE_ACTOR = 2;
|
|
|
- private final int PAGE_ACTIVITY = 3;
|
|
|
+ private final int PAGE_ACTOR = 2;
|
|
|
+ private final int PAGE_ACTIVITY = 3;
|
|
|
|
|
|
@BindView(R.id.top)
|
|
|
View topBar;
|
|
|
@@ -89,7 +89,7 @@ public class HomeFragment extends BaseFragment {
|
|
|
void initTopBar() {
|
|
|
int statusBarHeight = CommonUtils.getStatusBarHeight(getBaseActivity());
|
|
|
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) topBar.getLayoutParams();
|
|
|
- lp.height = PixelUtils.dp2px(55, getContext()) + statusBarHeight;
|
|
|
+ lp.height = getResources().getDimensionPixelSize(R.dimen.top_bar_height) + statusBarHeight;
|
|
|
topBar.setPadding(0, statusBarHeight, 0, 0);
|
|
|
topBar.setLayoutParams(lp);
|
|
|
}
|
|
|
@@ -122,7 +122,7 @@ public class HomeFragment extends BaseFragment {
|
|
|
}
|
|
|
|
|
|
private void changeTab() {
|
|
|
- if(curTab != null) {
|
|
|
+ if (curTab != null) {
|
|
|
curTab.setSelected(false);
|
|
|
}
|
|
|
switch (curPage) {
|