We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在已关闭的问题里面有,但是那个是2016年的了,现在这个问题怎么处理呢,用的是CommonNavigator,目前只发现oppo手机是这样的 CommonNavigator commonNavigator = new CommonNavigator(mActivity); commonNavigator.setAdapter(new CommonNavigatorAdapter() { @OverRide public int getCount() { return null == custom ? 0 : custom.size(); }
@Override public IPagerTitleView getTitleView(Context context, final int i) { SimplePagerTitleView simplePagerTitleView = new ScaleTransitionPagerTitleView(context); simplePagerTitleView.setText(custom.get(i).getName()); simplePagerTitleView.setTextSize(20); simplePagerTitleView.setNormalColor(Color.parseColor("#999999")); simplePagerTitleView.setSelectedColor(Color.parseColor("#333333")); if (simplePagerTitleView.isSelected()) { simplePagerTitleView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); } else { simplePagerTitleView.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL)); } simplePagerTitleView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { pos = i; vp_home.setCurrentItem(i); gridViewAdapter.setSelectPos(i); gridViewAdapter.notifyDataSetChanged(); NormalUtils.baiduStatistics(mActivity, custom.get(i).getEventid(), "首页-" + custom.get(i).getName()); } }); return simplePagerTitleView; } @Override public IPagerIndicator getIndicator(Context context) { LinePagerIndicator indicator = new LinePagerIndicator(context); indicator.setMode(LinePagerIndicator.MODE_EXACTLY); indicator.setLineHeight(UIUtil.dip2px(context, 0)); indicator.setLineWidth(UIUtil.dip2px(context, 0)); indicator.setStartInterpolator(new AccelerateInterpolator()); indicator.setEndInterpolator(new DecelerateInterpolator(2.0f)); indicator.setColors(Color.parseColor("#ff4849")); return indicator; } }); magic_indicator.setNavigator(commonNavigator); ViewPagerHelper.bind(magic_indicator, vp_home);
The text was updated successfully, but these errors were encountered:
你先确保 ViewPager 是不是能滑动,以及 ViewPager 的滑动回调是不是出错了,MI 是无状态的,滑不滑、滑多少完全依赖外面的回调。
Sorry, something went wrong.
No branches or pull requests
在已关闭的问题里面有,但是那个是2016年的了,现在这个问题怎么处理呢,用的是CommonNavigator,目前只发现oppo手机是这样的
CommonNavigator commonNavigator = new CommonNavigator(mActivity);
commonNavigator.setAdapter(new CommonNavigatorAdapter() {
@OverRide
public int getCount() {
return null == custom ? 0 : custom.size();
}
The text was updated successfully, but these errors were encountered: