Do this instead:
return new BitmapDrawable(context.getResources(), canvasBitmap);
More Related Contents:
- Can the Android drawable directory contain subdirectories?
- Android splash screen image sizes to fit all devices
- Understanding the Use of ColorMatrix and ColorMatrixColorFilter to Modify a Drawable’s Hue
- setBackground vs setBackgroundDrawable (Android)
- how to access the drawable resources by name in android
- Android HTML ImageGetter as AsyncTask
- Android Drawable Images from URL
- Retrieving all Drawable resources from Resources object
- android animation is not finished in onAnimationEnd
- how to get images dynamically from drawable folder
- Applying ColorFilter to ImageView with ShapedDrawable
- Android : Understanding drawable folder
- Why isn’t my vector drawable scaling as expected?
- Tiled drawable sometimes stretches
- Change shape solid color at runtime inside Drawable xml used as background
- Drawable to byte[]
- How to put text in a drawable?
- Changing gradient background colors on Android at runtime
- How to create Drawable from resource
- Change background of EditText’s error message
- Get the displayed size of an image inside an ImageView
- Android: How to check if a rectangle contains touched point?
- What’s the correct size icon for drawable-xxhdpi?
- Android Button Drawable Tint
- Styling EditText view with shape drawable to look similar to new holographic theme for Android < 3.0
- How to set foreground attribute to other non FrameLayout view
- Refreshing a LinearLayout after adding a view
- How to support all the different resolutions of android products
- How to set status bar background as gradient color or a drawable in Android?
- Modifying the color of an android drawable