com.flyco.tablayout.SegmentTabLayout Java Examples
The following examples show how to use
com.flyco.tablayout.SegmentTabLayout.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SkinSegmentTabLayout.java From Android-skin-support with MIT License | 6 votes |
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(); }
Example #2
Source File: SkinSegmentTabLayout.java From Android-skin-support with MIT License | 5 votes |
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(); } }
Example #3
Source File: SkinSegmentTabLayout.java From Android-skin-support with MIT License | 5 votes |
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(); } }