本文整理汇总了Java中net.lucode.hackware.magicindicator.buildins.UIUtil类的典型用法代码示例。如果您正苦于以下问题:Java UIUtil类的具体用法?Java UIUtil怎么用?Java UIUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIUtil类属于net.lucode.hackware.magicindicator.buildins包,在下文中一共展示了UIUtil类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showBody
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
@Override
protected void showBody() {
super.showBody();
viewPagerData.addAll(bindFragment());
titleData.addAll(bindTitleValue());
multiTypeAdapter = new MultiTypeAdapter(getChildFragmentManager(), viewPagerData);
mViewPager.setOffscreenPageLimit(builder.getScreenPageLimit());
mViewPager.setAdapter(multiTypeAdapter);
commonNavigator.setAdapter(navigatorAdapter);
commonNavigator.setAdjustMode(builder.isAdjustMode());
magicIndicator.setNavigator(commonNavigator);
LinearLayout titleContainer = commonNavigator.getTitleContainer();
titleContainer.setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE);
titleContainer.setDividerDrawable(new ColorDrawable() {
@Override
public int getIntrinsicWidth() {
return UIUtil.dip2px(mContext, builder.getIntrinsicWidth());
}
});
ViewPagerHelper.bind(magicIndicator, mViewPager);
}
示例2: init
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
private void init(Context context) {
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
mMinRadius = UIUtil.dip2px(context, 3);
mMaxRadius = UIUtil.dip2px(context, 5);
mCircleSpacing = UIUtil.dip2px(context, 8);
mNavigatorHelper.setNavigatorScrollListener(this);
mNavigatorHelper.setSkimOver(true);
}
示例3: init
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
private void init(Context context) {
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setStyle(Paint.Style.FILL);
mMaxCircleRadius = UIUtil.dip2px(context, 3.5);
mMinCircleRadius = UIUtil.dip2px(context, 2);
mYOffset = UIUtil.dip2px(context, 1.5);
}
示例4: init
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
private void init(Context context) {
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setStyle(Paint.Style.FILL);
mLineHeight = UIUtil.dip2px(context, 3);
mTriangleWidth = UIUtil.dip2px(context, 14);
mTriangleHeight = UIUtil.dip2px(context, 8);
}
示例5: init
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
private void init(Context context) {
setGravity(Gravity.CENTER);
int padding = UIUtil.dip2px(context, 10);
setPadding(padding, 0, padding, 0);
setSingleLine();
setEllipsize(TextUtils.TruncateAt.END);
}
示例6: init
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
private void init(Context context) {
int textSize = UIUtil.dip2px(context, 16);
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setTextSize(textSize);
int padding = UIUtil.dip2px(context, 10);
setPadding(padding, 0, padding, 0);
}
示例7: initViews
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
@Override
public void initViews() {
builder = builder();
if (builder == null) {
throw new IllegalArgumentException("builder 不能为空");
}
magicIndicator = (MagicIndicator) findViewById(R.id.base_title_magic_indicator);
mViewPager = (NoScrollViewPager) findViewById(R.id.base_title_view_pager);
magicIndicatorParent = (LinearLayout) findViewById(R.id.base_title_magic_parent);
cutOffRule = findViewById(R.id.base_title_cut_off_rule);
magicIndicatorParent.setBackgroundResource(builder.getMultiTypeBgColor());
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
UIUtil.dip2px(mContext, builder.getTitleViewHeight()));
layoutParams.setMargins(UIUtil.dip2px(mContext, builder.getHeadViewMarginsLeft()),
UIUtil.dip2px(mContext, builder.getHeadViewMarginsTop()),
UIUtil.dip2px(mContext, builder.getHeadViewMarginsRight()),
UIUtil.dip2px(mContext, builder.getHeadViewMarginsBottom()));
magicIndicator.setLayoutParams(layoutParams);
magicIndicator.requestLayout();
if (!builder.isShowCutOffRule()) {
cutOffRule.setVisibility(View.GONE);
}
if (builder.getMultiTypeBodyBgColor() != 0) {
mViewPager.setBackgroundResource(builder.getMultiTypeBodyBgColor());
}
mViewPager.setScroll(builder.isScroll());
cutOffRule.setBackgroundResource(builder.getCutOffRuleColor());
}
示例8: init
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
private void init(Context context) {
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
mMinRadius = UIUtil.dip2px(context, 2);
mMaxRadius = UIUtil.dip2px(context, 3);
mCircleSpacing = UIUtil.dip2px(context, 8);
mNavigatorHelper.setNavigatorScrollListener(this);
mNavigatorHelper.setSkimOver(true);
}
示例9: DotPagerIndicator
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
public DotPagerIndicator(Context context) {
super(context);
mRadius = UIUtil.dip2px(context, 3);
mYOffset = UIUtil.dip2px(context, 3);
mDotColor = Color.WHITE;
}
示例10: DummyCircleNavigator
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
public DummyCircleNavigator(Context context) {
super(context);
mRadius = UIUtil.dip2px(context, 3);
mCircleSpacing = UIUtil.dip2px(context, 8);
mStrokeWidth = UIUtil.dip2px(context, 1);
}
示例11: init
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
private void init(Context context) {
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
mRadius = UIUtil.dip2px(context, 3);
mCircleSpacing = UIUtil.dip2px(context, 8);
mStrokeWidth = UIUtil.dip2px(context, 1);
}
示例12: init
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
private void init(Context context) {
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setStyle(Paint.Style.FILL);
mLineHeight = UIUtil.dip2px(context, 3);
mLineWidth = UIUtil.dip2px(context, 10);
}
示例13: init
import net.lucode.hackware.magicindicator.buildins.UIUtil; //导入依赖的package包/类
private void init(Context context) {
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setStyle(Paint.Style.FILL);
mVerticalPadding = UIUtil.dip2px(context, 6);
mHorizontalPadding = UIUtil.dip2px(context, 10);
}