22 questions
3
votes
1
answer
251
views
How to display animated GIFs in Jetpack Compose?
I'm building an Android app using Jetpack Compose, and I want to display an animated GIF image. I added the GIF to my drawable folder and tried displaying it using the Image composable like this:
...
0
votes
0
answers
36
views
Displaying an image within a Surface shape with Jetpack Compose
I'm currently developing an Android application for my old Instant Lab, whose official app is no longer maintained and available on my phone.
The goal of this application is to detect three touch ...
0
votes
1
answer
298
views
ImageVector (or painterResource) as a mask for a Composable
I found a good tutorial on how to use an image as a mask, to allow a Composable to be in the shape of an image
However, it seems to only be for ImageBitmap and I can't get it to work a ImageVector - ...
3
votes
1
answer
1k
views
How to get ImageBitmap from a Painter in Jetpack Compose?
I should use the Image() composable that takes image bitmap as its argument.
How can I convert a Painter to ImageBitmap in Compose?
1
vote
1
answer
111
views
Showing an animated progress wheel in Jetpack Compose
In this Google Codelab (Mars Photos), while Coil is loading images, the app displays a progress wheel. The code uses this XML file as a drawable:
and uses this code to display it:
@Composable
fun ...
2
votes
2
answers
5k
views
How to correctly apply tint to compose Image?
Image(
painter = painterResource(id = paymentCardLogoId),
contentDescription = null,
modifier = Modifier.size(logoSize)
)
So I have a payment card details view and I am trying ...
3
votes
1
answer
297
views
How to create background checker board for image with Jetpack Compose?
I have an image in Compose which may contain transparency. How can I show a checkered background behind the transparent parts of the picture (like in photoshop)?
0
votes
1
answer
51
views
Android. How to correctly position elements in row?
I'm trying to position elements in my Row like this: text first, immediately followed by an icon, and a second icon that should be nailed to the end (right edge). Here is a visual example of what it ...
3
votes
2
answers
7k
views
Clip image in Jetpack Compose
I am using clip to trim an Image using Compose, to show only the left edge part of the image. But it maintains the width with blank space. How can I crop the right part(marked in red)?
I tried ...
3
votes
1
answer
4k
views
Get image uri and display it with Coil in Compose (Android)
I'm trying to fetch image uri and then display it in my application with coil.
var imageUri by remember { mutableStateOf<Uri?>(null) }
val launcher =
rememberLauncherForActivityResult(...
6
votes
2
answers
6k
views
How to load image from assets in Jetpack Compose
I have hundreds of png files in assets folder and I want to load them into Image composable. But what I can use only images in drawable folder.
how to load images from assets into Image?
4
votes
2
answers
3k
views
Is it possible to change the size of the Image composable without triggering recomposition
I have an animateDpAsState(..), whenever this animation is triggered it changes the Modifier.size(value) of an Image(...) thus causing recomposition.
Is there a way to skip composition phase for this ...
3
votes
1
answer
879
views
Why does the image not render in Android Studio when an integer variable containing the drawable is passed to the painterResource function?
I have a requirement to display different images based on certain user interactions. So, I'm storing the drawable resource ID in an integer variable. However, when I pass this variable into the Image'...
1
vote
1
answer
1k
views
Jetpack compose not showing bitmap image for very high quality image
When image bitmap is low quality I am able to load and display the image with coil but when image bitmap is very high quality the screen doesn't show anything and pressing back lets to crash the app.
...
2
votes
1
answer
647
views
Collapsing Layout in Jetpack Compose
I am trying to build a collapsing layout in jetpackCompose but couldn't figure it out how the lerp function is throwing up a error i am providing the specific size and float. Error say the following ...
1
vote
2
answers
2k
views
Android Jetpack Compose - make an image fill max size with a border just around the image
I'm new to android compose. I want to put an image with borders that look like this code.
preview image
Column(
verticalArrangement = Arrangement.Bottom,
horizontalAlignment = Alignment....
1
vote
2
answers
980
views
How to transform Image Composable to match 3 touch points in Compose
I am currently playing with my old Instant Lab device and I am trying to recreate parts of the old app in jetpack compose.
A feature of the device is to detect 3 touch points on the screen in order to ...
3
votes
2
answers
3k
views
Coil: Loading image from firebase not working - Unable to fetch data. No fetcher supports
Image(
modifier = Modifier.size(100.dp).padding(16.dp),
painter = rememberImagePainter(
ImageRequest.Builder(LocalContext.current)
// .data("https:/...
3
votes
1
answer
1k
views
Icon drawable inside IconButton is black despite it being white
The Icon drawable inside the IconButton composable is black despite it being white. The picture below of the current setup shows the garbage can icon at the top right on an alpha background. How can I ...
0
votes
1
answer
3k
views
GlideImage composable in Landscapist library missing some parameters
The GlideImage composable in the Landscapist image loading library for Compose is missing the loading, success, and failure parameters, but the GitHub Readme for the library states these parameters ...
1
vote
1
answer
957
views
Camera image from FileProvider Uri only displaying for first time
My Jetpack Compose camera app is targeting API Level 32 and is being tested on an Android 11 phone. I'm generating a Uri with FileProvider to take a photo with the stock camera app. Logcat shows the ...
2
votes
2
answers
4k
views
Add drop shadow to svg vector image in jetpack compose
I have a white arrow svg vector set in Image inside Box to which I want to add drop shadow so that it could be visible in white background too. Below is how it would look like:
This is the arrow to ...