This tag is for questions related to images on Android
Questions tagged [android-image]
1540 questions
21
votes
4 answers
Android: only use xxhdpi images
Is there any drawback in only using xxhdpi images and letting android scale the images?
(Yes it might be more cpu intensive, but is it notable?) I tested it on a samsung s2 and the difference were small.
Is there a restriction to only use this if…

suizo
- 531
- 8
- 24
20
votes
2 answers
How to create a video preview in android?
I have a video file in my sdcard. I would like to show a preview of this video in my ImageView . Please let me know how to do this in Android. Thank you for your help and time.

Vinod
- 31,933
- 35
- 96
- 119
20
votes
6 answers
Android Blur View (Blur background behind the view)
I am trying to make the bottom part of an Image blur for the view on top it like in the image.
I tried blurring it using Rendenscript but I am not able to blur only the part behind the view. :(
I have seen many libraries but almost all of them blur…

Atul O Holic
- 6,692
- 4
- 39
- 74
19
votes
2 answers
How to add image effects in android ?
I am trying to apply effect (sepia, brightness, bloom and other image effects if API for them is available) on an image for my android app. But I am totally unable to get precise and well mannered code or concept for solving such problem. Although…

aman
- 193
- 1
- 1
- 4
17
votes
9 answers
Changing the drawable size inside a button
I want to create a Button like this:
Here is my code:
17
votes
1 answer
Android notification big picture dimensions
I'm trying to find the exact dimensions of the big picture style image on Android notification. Indeed, I need those in order to compute images on-the-fly at the right dimensions to avoid too big downloads in my application.
I've made some tests…

ArchOrn
- 171
- 1
- 3
16
votes
3 answers
Is there a way to crop Image/ImageProxy (before passing to MLKit's analyzer)?
I'm using CameraX's Analyzer use case with the MLKit's BarcodeScanner. I would like to crop portion of the image received from the camera, before passing it to the scanner.
What I'm doing right now is I convert ImageProxy (that I recieve in the…

Oleksii Urusov
- 378
- 2
- 8
16
votes
3 answers
How to change the ic_launcher_round.png folder content?
I am having difficulties in changing the icon of an Android app. I have followed these instructions:
Right click on the project
Select New -> Image Asset
Select 'Asset Type' as Image
Select Path of and .png image
Optional: padding, trimming…

Dilshad Abduwali
- 1,388
- 7
- 26
- 47
16
votes
4 answers
Loading large images without OutOfMemoryError
I have a 5000 x 4000 px image which I want to draw onto a canvas.
First I tried to load it from resources.
I put it in /res/drawable.
I used the following method:
InputStream input = getResources().openRawResource(R.drawable.huge_image);
Drawable d…

Benito Bertoli
- 25,285
- 12
- 54
- 61
14
votes
4 answers
Can Picasso queue for me?
Here's a critical point I don't know concerning the behavior of Picasso.
Imagine you are, say, showing a slide-show of ten items. Say, they are on-screen for ten seconds each.
The ideal behavior would be this: at the start of the slide show, I…

Fattie
- 27,874
- 70
- 431
- 719
14
votes
5 answers
How to upload an image to Firebase storage?
I'm trying to upload a simple byte array into Firebase storage, but my onFailureListener keeps getting called and logging back to me saying that the upload failed. I'm hoping you guys can tell me whats wrong with my code.
At the top I got
…

TheQ
- 1,949
- 10
- 38
- 63
14
votes
2 answers
Android File Provider Illegal Argument Exception
I am using file provider to save photo to a given destination.
I get:
java.lang.IllegalArgumentException: Missing android.support.FILE_PROVIDER_PATHS meta-data
while trying to open activity to capture image from camera.
My manifest.xml…

Michał
- 655
- 6
- 19
13
votes
2 answers
Android: Which image format shall I use and why?
Im a beginner programmer, and my question is:
Which image format shall i use for my android app?
Descripton:
I only use illustrations, so the images are mostly background images, and some buttons, and i would like to know which is the best way to do…

Adam Varhegyi
- 11,307
- 33
- 124
- 222
13
votes
6 answers
Android - How to show images from resources drawable?
I'm not able to show an image which is saved in res/drawable folder.
I use ImageGetter to do this. The code is below:
ImageGetter imageGetter3 = new ImageGetter() {
public Drawable getDrawable(String source) {
int id=0;…

Yanny
- 163
- 1
- 2
- 8
13
votes
1 answer
File Logo.png does not exist in Android Studio when i try to create image asset
When I try to create action icon in Image Asset of Android Studio I saw the error log: logo.png does not exist and I can not create Action bar and Tab bar icon. Anyone can help me?

Arbaz.in
- 1,478
- 2
- 19
- 41