Android Drawable Create getPressedDrawable(int color)

Here you can find the source of getPressedDrawable(int color)

Description

get Pressed Drawable

License

Open Source License

Declaration

protected static StateListDrawable getPressedDrawable(int color) 

Method Source Code

//package com.java2s;
import android.R;

import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.StateListDrawable;

public class Main {

    protected static StateListDrawable getPressedDrawable(int color) {
        StateListDrawable drawable = new StateListDrawable();
        drawable.addState(new int[] { R.attr.state_pressed },
                new ColorDrawable(color));
        return drawable;
    }//from w  w  w . j  a  va2s . c o  m
}

Related

  1. loadDrawable(final String imageUrl, final ImageView imageView, final ImageCallback imageCallback)
  2. getDrawableById(Context paramContext, String paramString)
  3. getDrawableFromUrl(String url)
  4. getDrawableByName(Context ctx, String name)
  5. getDrawable(final Context context, final String packageName, final int resourceID)
  6. drawableToTransitionDrawable( Drawable drawable)
  7. createTempImageFile(Context context, Drawable drawable)