当前位置: 首页>>代码示例>>Java>>正文


Java UIUtil类代码示例

本文整理汇总了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);
}
 
开发者ID:zengcanxiang,项目名称:MVP-Practice-Project-Template,代码行数:26,代码来源:MultiTypeFragment.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:ScaleCircleNavigator.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:BezierPagerIndicator.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:TriangularPagerIndicator.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:SimplePagerTitleView.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:ClipPagerTitleView.java

示例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());

}
 
开发者ID:zengcanxiang,项目名称:MVP-Practice-Project-Template,代码行数:33,代码来源:MultiTypeActivity.java

示例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);
}
 
开发者ID:452MJ,项目名称:C9MJ,代码行数:9,代码来源:ScaleCircleNavigator.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:DotPagerIndicator.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:DummyCircleNavigator.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:CircleNavigator.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:LinePagerIndicator.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:WrapPagerIndicator.java


注:本文中的net.lucode.hackware.magicindicator.buildins.UIUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。