SHARE
TWEET

Untitled

a guest Jun 16th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
  2. final Drawable wallpaperDrawable = wallpaperManager.getDrawable();
  3. Bitmap bitmap = ((BitmapDrawable)wallpaperDrawable).getBitmap();
  4.      
  5. WallpaperManager wallpaperManager = WallpaperManager.getInstance(mContext);
  6. Drawable wallpaperDrawable = wallpaperManager.getDrawable();
  7. Bitmap bm = ((BitmapDrawable) wallpaperDrawable).getBitmap();
  8.      
  9. ImageView imageView = ((ImageView)v);
  10. Bitmap bitmap = ((BitmapDrawable)imageView.getDrawable()).getBitmap();
  11. int pixel = bitmap.getPixel(x,y);
  12. int redValue = Color.red(pixel);
  13. int blueValue = Color.blue(pixel);
  14. int greenValue = Color.green(pixel);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top