Questions tagged [bitmapdrawable]
42 questions
0
votes
1 answer
Cannot save image from Bitmap
I get a warning stating that the result of cachePath.createNewFile(); is ignored. Otherwise the following code does not save an image to my phone. What can I do?
holder.messageImage.setOnLongClickListener(v -> {
…

Martin Erlic
- 5,467
- 22
- 81
- 153
0
votes
1 answer
LayerDrawable as background drawable does not work on minSdkVersion=15 or lower
Although I couldn't find any SDK version constraints for LayerDrawable (added in API level 1), the one I am using as a background acts differently depending on the minSdkVersion: if it is 15 or lower, the background is completely black, if it is 19…

meztelentsiga
- 171
- 1
- 10
0
votes
1 answer
Setting bitmap as window background
I want to set a BitmapDrawable as background for a window of a particular activity. But I recently read that drawables are not easily collected by the Garbage Collector. So is this a bad practice?
user5759258
0
votes
2 answers
Universal Image Loader and BitmapDrawable
We have an image in B64, an we want to use that image as loading image in Universal Image Loader while a better image isn't loaded from an url. So we create a bitmap from that url in b64 and convert it into a BitmapDrawable.
The result is shown fine…

FVod
- 2,245
- 5
- 25
- 52
0
votes
2 answers
android : roundedImageView with VectorDrawables
I am getting error while setting Vector Drawables to RoundedImageView. I am clear with error I am getting, its because I am trying to cast a drawable to BitmapDrawable but it should be VectorDrawable (If I am not wrong), So can anyone suggest me the…

Chintan Soni
- 24,761
- 25
- 106
- 174
0
votes
2 answers
How to retrieve URI or ID from BitmapDrawable
I would like to display names and icons of every installed apps. To do this, I'm retrieving informations with this code :
List apps = getPackageManager().getInstalledPackages(0);
ArrayList res = new ArrayList<>();
for(int…

John
- 3
- 4
0
votes
1 answer
Android - AlertDialog won't show BitmapDrawable
In my app, I'm downloading a small Facebook profile picture and show it in an AlertDialog (as BitmapDrawable) along with the user first and last name.
Now, my problem is that on some devices the BitmapDrawable is shown in the AlertDialog (Android…

izac89
- 3,790
- 7
- 30
- 46
0
votes
1 answer
how to show android bitmapdrawable change on next clickevents
On next click when user inputs text, previous text on image is gone. How to save all text inputs on bitmap drawable on all click events. Please suggest.
onCreate() {
ImageView mView = (ImageView) findViewById(R.id.dstImageView);
Drawable…

andromania
- 1
- 1
0
votes
1 answer
Android BitmapDrawable results in out of memory
Basically I have 4 ImageView in the UI and I want to set image to them. Following is the related codes:
private void showPhoto() {
// (re)set the image button's image based on our photo
Photo p = mCrime.getPhoto();
BitmapDrawable b =…

chrisTina
- 2,298
- 9
- 40
- 74
0
votes
1 answer
Are there any alternatives to getting a bitmap from XML other than using BitmapDrawable
I'm currently using BitmapDrawable in my app, but unfortunately, this implementation seems somewhat broken in Lollipop (It worked OK prior to LP, there's a separarte question regarding that issue).
So, OK, I have an XML file which is basically…

Zippy
- 3,826
- 5
- 43
- 96
0
votes
0 answers
Creating a BitmapDrawable in a static context
Please help!
I have a problem with creating a BitmapDrawable in a static context.
I am creating an android app for a student contest and since the MainActivity class starts
to look "dirty" (having lots of code in it) I decided to make…

user2592139
- 21
- 1
0
votes
1 answer
Draw text after animation complete android
i am confused to draw text after completion of animation
here i tried i get draw able Drawable temp = animationDrawable.getCurrent(); after complete animation and send to method setDrawble(Drawable temp)
here i am writing text on last frame and…

Ando Masahashi
- 3,112
- 2
- 24
- 41