List of usage examples for android.content.res TypedArray getDrawable
@Nullable public Drawable getDrawable(@StyleableRes int index)
From source file:br.liveo.ui.ScrimInsetsFrameLayout.java
private void init(Context context, AttributeSet attrs, int defStyle) { final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ScrimInsetsView, defStyle, 0); if (a == null) { return;/*from w w w. ja va2 s . co m*/ } mInsetForeground = a.getDrawable(R.styleable.ScrimInsetsView_insetForeground); a.recycle(); setWillNotDraw(true); }
From source file:com.androcast.illusion.illusionmod.elements.ScrimInsetsFrameLayout.java
private void init(Context context, AttributeSet attrs, int defStyle) { final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ScrimInsetsView, defStyle, 0); if (a == null) { return;//from w w w . j a v a2s. c o m } mInsetForeground = a.getDrawable(R.styleable.ScrimInsetsView_insetFg); a.recycle(); setWillNotDraw(true); }
From source file:com.ant.track.app.ui.ScrimInsetsRelativeLayout.java
private void init(Context context, AttributeSet attrs, int defStyle) { final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ScrimInsetsView, defStyle, 0); if (a == null) { return;/*w ww . j a v a 2s .c o m*/ } mInsetForeground = a.getDrawable(R.styleable.ScrimInsetsView_insetForeground2); a.recycle(); setWillNotDraw(true); }
From source file:com.anton.sample.view.ScrimInsetsFrameLayout.java
private void init(Context context, AttributeSet attrs, int defStyle) { final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ScrimInsetsView, defStyle, 0); if (a == null) { return;/*w w w.j ava2s.c om*/ } mInsetForeground = a.getDrawable(R.styleable.ScrimInsetsView_si_insetForeground); a.recycle(); setWillNotDraw(true); }
From source file:com.aprz.easy_iosched.ui.widget.ScrimInsetsFrameLayout.java
private void init(Context context, AttributeSet attrs, int defStyle) { final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ScrimInsetsView, defStyle, 0); if (a == null) { return;/*from w w w .jav a2s. c om*/ } mInsetForeground = a.getDrawable(R.styleable.ScrimInsetsView_appInsetForeground); a.recycle(); setWillNotDraw(true); }
From source file:com.misterpereira.android.kiteplayer.ui.ScrimInsetsRelativeLayout.java
private void init(Context context, AttributeSet attrs, int defStyle) { final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ScrimInsetsView, defStyle, 0); if (a == null) { return;/*from ww w .j a v a 2 s . c o m*/ } mInsetForeground = a.getDrawable(R.styleable.ScrimInsetsView_legacyInsetForeground); a.recycle(); setWillNotDraw(true); }
From source file:com.maks.farmfresh24.utils.ScrimInsetsFrameLayout.java
private void init(Context context, AttributeSet attrs, int defStyle) { final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ScrimInsetsView, defStyle, 0); if (a == null) { return;// ww w . jav a 2 s . c o m } mInsetForeground = a.getDrawable(R.styleable.ScrimInsetsView_scrimInsetForeground); a.recycle(); setWillNotDraw(true); }
From source file:com.jun.jokedaquan.widget.divider.DividerItemDecoration.java
/** * Construct a decoration with system drawable and must be specify the orientation * * @param orientation the orientation must be one of the {@link #VERTICAL_LIST} or {@link #HORIZONTAL_LIST}. * @param context Context//from www.j a va2 s. c om */ public DividerItemDecoration(@Orientation int orientation, Context context) { final TypedArray a = context.obtainStyledAttributes(ATTRS); mDivider = a.getDrawable(0); a.recycle(); setOrientation(orientation); }
From source file:com.velli.passwordmanager.widget.ScrimInsetsFrameLayout.java
private void init(Context context, AttributeSet attrs, int defStyle) { final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ScrimInsetsView, defStyle, 0); if (a == null) { return;// ww w. j av a2 s .co m } mInsetForeground = a.getDrawable(R.styleable.ScrimInsetsView_frameInsetForeground); a.recycle(); setWillNotDraw(true); }
From source file:com.amaze.carbonfilemanager.ui.views.ScrimInsetsRelativeLayout.java
private void init(Context context, AttributeSet attrs, int defStyle) { final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ScrimInsetsFrameLayout, defStyle, 0); if (a == null) { return;//from ww w. j av a 2 s . co m } mInsetForeground = a.getDrawable(R.styleable.ScrimInsetsFrameLayout_insetForeground); a.recycle(); setWillNotDraw(true); }