List of usage examples for android.support.v4.content.res ResourcesCompat getDrawable
public static Drawable getDrawable(Resources resources, int i, Theme theme) throws NotFoundException
From source file:com.nadmm.airports.utils.UiUtils.java
static public Drawable getTintedDrawable(Context context, int resid, int color) { // Get a mutable copy of the drawable so each can be set to a different color String key = String.format(Locale.US, "%d:%d", resid, color); Drawable d = getDrawableFromCache(key); if (d == null) { d = ResourcesCompat.getDrawable(context.getResources(), resid, null).mutate(); DrawableCompat.setTint(d, color); putDrawableIntoCache(key, d);// ww w . j a va 2 s . co m } return d; }
From source file:com.nttec.everychan.chans.dvach.DvachModule.java
@Override public Drawable getChanFavicon() { return ResourcesCompat.getDrawable(resources, R.drawable.favicon_dvach, null); }
From source file:org.glucosio.android.activity.HelloActivity.java
private void initStartButton() { final Drawable pinkArrow = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_navigate_next_pink_24px, null); if (pinkArrow != null) { pinkArrow.setBounds(0, 0, 60, 60); startButton.setCompoundDrawables(null, null, pinkArrow, null); }/*w ww . j a v a 2s. co m*/ }
From source file:com.google.android.leanbackjank.ui.MainFragment.java
private void setBackground() { mBackgroundManager = BackgroundManager.getInstance(getActivity()); mBackgroundManager.attach(getActivity().getWindow()); mBackgroundManager/*from www. ja va 2s . c o m*/ .setDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.default_background, null)); }
From source file:com.nttec.everychan.chans.inach.InachModule.java
@Override public Drawable getChanFavicon() { return ResourcesCompat.getDrawable(resources, R.drawable.favicon_inach, null); }
From source file:org.microg.tools.ui.Condition.java
public Drawable getIcon(Context context) { if (iconRes != 0) { return ResourcesCompat.getDrawable(context.getResources(), iconRes, context.getTheme()); }/* ww w . ja va 2s. c om*/ return icon; }
From source file:com.google.android.leanbackjank.ui.MainFragment.java
private void setupUIElements() { setBadgeDrawable(ResourcesCompat.getDrawable(getActivity().getResources(), R.drawable.app_banner, null)); // Badge, when set, takes precedent over title setTitle(getString(R.string.browse_title)); setHeadersState(HEADERS_ENABLED);/* ww w . j ava 2s .c o m*/ setHeadersTransitionOnBackEnabled(true); // set headers background color setBrandColor(ResourcesCompat.getColor(getResources(), R.color.jank_yellow, null)); // set search icon color setSearchAffordanceColor(ResourcesCompat.getColor(getResources(), R.color.search_opaque, null)); setHeaderPresenterSelector(new PresenterSelector() { @Override public Presenter getPresenter(Object o) { return new HeaderItemPresenter(); } }); }
From source file:nya.miku.wishmaster.chans.endchan.EndChanModule.java
@Override public Drawable getChanFavicon() { return ResourcesCompat.getDrawable(resources, R.drawable.favicon_endchan, null); }
From source file:com.nttec.everychan.chans.anonfm.AnonFmModule.java
@Override public Drawable getChanFavicon() { return ResourcesCompat.getDrawable(resources, R.drawable.favicon_anonfm, null); }
From source file:com.nttec.everychan.chans.horochan.HorochanModule.java
@Override public Drawable getChanFavicon() { return ResourcesCompat.getDrawable(resources, R.drawable.favicon_horochan, null); }