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


Java SegmentTabLayout类代码示例

本文整理汇总了Java中com.flyco.tablayout.SegmentTabLayout的典型用法代码示例。如果您正苦于以下问题:Java SegmentTabLayout类的具体用法?Java SegmentTabLayout怎么用?Java SegmentTabLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SegmentTabLayout类属于com.flyco.tablayout包,在下文中一共展示了SegmentTabLayout类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: obtainAttributes

import com.flyco.tablayout.SegmentTabLayout; //导入依赖的package包/类
private void obtainAttributes(Context context, AttributeSet attrs) {
    TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.SegmentTabLayout);
    mIndicatorColorResId = ta.getResourceId(R.styleable.SegmentTabLayout_tl_indicator_color, INVALID_ID);
    mIndicatorColorResId = SkinCompatHelper.checkResourceId(mIndicatorColorResId);
    mDividerColorResId = ta.getResourceId(R.styleable.SegmentTabLayout_tl_divider_color, mIndicatorColorResId);
    mDividerColorResId = SkinCompatHelper.checkResourceId(mDividerColorResId);
    mTextSelectColorResId = ta.getResourceId(R.styleable.SegmentTabLayout_tl_textSelectColor, INVALID_ID);
    mTextSelectColorResId = SkinCompatHelper.checkResourceId(mTextSelectColorResId);
    mTextUnselectColorResId = ta.getResourceId(R.styleable.SegmentTabLayout_tl_textUnselectColor, mIndicatorColorResId);
    mTextUnselectColorResId = SkinCompatHelper.checkResourceId(mTextUnselectColorResId);
    mBarColorResId = ta.getResourceId(R.styleable.SegmentTabLayout_tl_bar_color, INVALID_ID);
    mBarColorResId = SkinCompatHelper.checkResourceId(mBarColorResId);
    mBarStrokeColorResId = ta.getResourceId(R.styleable.SegmentTabLayout_tl_bar_stroke_color, mIndicatorColorResId);
    mBarStrokeColorResId = SkinCompatHelper.checkResourceId(mBarStrokeColorResId);
    ta.recycle();
    applySegmentTabLayoutResources();
}
 
开发者ID:ximsfei,项目名称:Android-skin-support,代码行数:18,代码来源:SkinSegmentTabLayout.java

示例2: initView

import com.flyco.tablayout.SegmentTabLayout; //导入依赖的package包/类
@Override
public View initView() {
    View view = View.inflate(mContext, R.layout.fragment_type, null);
    segmentTabLayout = (SegmentTabLayout) view.findViewById(R.id.tl_1);
    iv_type_search = (ImageView) view.findViewById(R.id.iv_type_search);
    fl_type = (FrameLayout) view.findViewById(R.id.fl_type);

    return view;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:TypeFragment.java

示例3: setBarColor

import com.flyco.tablayout.SegmentTabLayout; //导入依赖的package包/类
private void setBarColor(int color) {
    try {
        Field barColor = SegmentTabLayout.class.getDeclaredField("mBarColor");
        barColor.setAccessible(true);
        barColor.set(this, color);
        invalidate();
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:ximsfei,项目名称:Android-skin-support,代码行数:11,代码来源:SkinSegmentTabLayout.java

示例4: setBarStrokeColor

import com.flyco.tablayout.SegmentTabLayout; //导入依赖的package包/类
private void setBarStrokeColor(int color) {
    try {
        Field barStrokeColor = SegmentTabLayout.class.getDeclaredField("mBarStrokeColor");
        barStrokeColor.setAccessible(true);
        barStrokeColor.set(this, color);
        invalidate();
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:ximsfei,项目名称:Android-skin-support,代码行数:11,代码来源:SkinSegmentTabLayout.java

示例5: setSegmentTabData

import com.flyco.tablayout.SegmentTabLayout; //导入依赖的package包/类
public void setSegmentTabData(Fragment fragment, final SegmentTabLayout tabLayout, final ViewPager viewPager,
                              String[] titles, List<Fragment> fragments) {
    setSegmentTabData(fragment, tabLayout, viewPager, titles, fragments, null);
}
 
开发者ID:AriesHoo,项目名称:FastLib,代码行数:5,代码来源:TabLayoutManager.java


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