Example usage for android.support.v4.content.res ResourcesCompat getDrawable

List of usage examples for android.support.v4.content.res ResourcesCompat getDrawable

Introduction

In this page you can find the example usage for android.support.v4.content.res ResourcesCompat getDrawable.

Prototype

public static Drawable getDrawable(Resources resources, int i, Theme theme) throws NotFoundException 

Source Link

Usage

From source file:com.nttec.everychan.chans.cirno.OwlchanModule.java

@Override
public Drawable getChanFavicon() {
    return ResourcesCompat.getDrawable(resources, R.drawable.favicon_owlchan, null);
}

From source file:com.example.dany.jjdraw.MainActivity.java

public void paintClicked(View view) {
    drawView.setErase(false);//from w ww. ja va2 s. c  o m
    if (view != currPaint) {
        ImageButton imgView = (ImageButton) view;
        String color = view.getTag().toString();
        drawView.setColor(color);

        imgView.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.paint_pressed, null));
        currPaint.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.paint, null));
        currPaint = (ImageButton) view;
    }
    drawView.setBrushSize(drawView.getLastBrushSize());
}

From source file:com.nttec.everychan.chans.krautchan.KrautModule.java

@Override
public Drawable getChanFavicon() {
    return ResourcesCompat.getDrawable(resources, R.drawable.favicon_krautchan, null);
}

From source file:com.nttec.everychan.chans.tohnochan.TohnoChanModule.java

@Override
public Drawable getChanFavicon() {
    return ResourcesCompat.getDrawable(resources, R.drawable.favicon_tohnochan, null);
}

From source file:nya.miku.wishmaster.chans.honeychan.HoneyModule.java

@Override
public Drawable getChanFavicon() {
    return ResourcesCompat.getDrawable(resources, R.drawable.favicon_honeychan, null);
}

From source file:com.nttec.everychan.chans.synch.SynchModule.java

@Override
public Drawable getChanFavicon() {
    return ResourcesCompat.getDrawable(resources, R.drawable.favicon_synch, null);
}

From source file:nya.miku.wishmaster.chans.diochan.DiochanModule.java

@Override
public Drawable getChanFavicon() {
    return ResourcesCompat.getDrawable(resources, R.drawable.favicon_diochan, null);
}

From source file:com.zogamonline.laisiangthou.MaterialPreferenceLib.custom_preferences.DialogPreference.java

public void setDialogIcon(int dialogIconRes) {
    mDialogIcon = ResourcesCompat.getDrawable(getContext().getResources(), dialogIconRes, null);
}

From source file:ua.juliazozulia.taskcollector.ui.main.MainActivity.java

public void syncDrawerIcon() {
    new Handler().postDelayed(new Runnable() {
        @Override//from w w w . ja  v  a 2 s  .c o m
        public void run() {
            mToolbar.setNavigationIcon(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_menu, null));
        }
    }, 100);
}

From source file:com.mifos.mifosxdroid.online.ClientChargeFragment.java

@Override
public void onPrepareOptionsMenu(Menu menu) {
    menu.clear();/*from  w ww .  j ava  2  s  . com*/
    MenuItem menuItemAddNewDocument = menu.add(Menu.NONE, MENU_ITEM_ADD_NEW_CHARGES, Menu.NONE,
            getString(R.string.add_new));
    menuItemAddNewDocument
            .setIcon(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_action_content_new, null));

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
        menuItemAddNewDocument.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
    super.onPrepareOptionsMenu(menu);
}