Questions tagged [android-jetpack-compose]
Jetpack Compose is Android’s modern toolkit for building native declarative UI made by Google. If you're targeting desktop with Compose for Desktop, use both this and [compose-desktop] tags.
android-jetpack-compose
13,238
questions
0
votes
0
answers
7
views
Capture Composable to bitmap without rendering them
i made a simple app which makes you an id card when you open the id card it shows the details with the card design that you can print. the whole card design looks good in preview but when i use ...
0
votes
0
answers
9
views
Jetpack Compose with just one button uses too much CPU
I'm new to Jetpack Compose, and I was trying it.
I'm using IntelliJ IDEA, and I'm making one for desktop.
I created a new Jetpack Compose with IntelliJ IDEA, and I runned it nothing changed with ...
0
votes
0
answers
6
views
Custom Icon in MarkerComposable don't get updated after update text inside it
I have a map with markers and the marker I add a custom icon to it with a text indicating the sequence of that marker.
and what's happening is when I update these marker sequences it's not get updated ...
0
votes
0
answers
22
views
How can I implement this corner curve in Jetpack Compose for this design [closed]
I'm aiming to replicate this design using Jetpack Compose, but I'm encountering challenges in achieving the desired look.
Cardview with curve
I'm seeking assistance in recreating this design using ...
2
votes
2
answers
32
views
ERROR: Composable Functions Must Be Called Within a Composable Context
"@Composable invocations can only happen from the context of a @Composable function"
I'm new to jetpack compose and constantly getting this error "@Composable invocations can only ...
0
votes
0
answers
14
views
Android compose `NotificationListenerService.onNotificationPosted` is never called
I'm trying to add a notification listener to a Kotlin android compose project:
My AndroidManigest.xml:
<application>
<!-- ... -->
<service
android:name=&...
0
votes
1
answer
14
views
Can not create instance of viewModel in Compose Multiplatform Desktop App
I am just playing with compose multiplatform and injecting viewModel using Koin. Here are my koin Initialization in common Module:
fun initKoin(config: KoinAppDeclaration? = null) {
startKoin {
...
1
vote
1
answer
18
views
How to render OpenGL alongside Jetpack Compose UI without covering other elements
I'm trying to render an OpenGL view with a Jetpack Compose UI displaying below it. I took example code from https://developer.android.com/develop/ui/compose/migrate/interoperability-apis/views-in-...
1
vote
0
answers
21
views
What prevents my cellphone from retrieving the info in my room database?
I have an app with a room database. The person registers himself and the value he inputs is stored in a room database. The value is retrieved and updated in another screen. It works fine on 3 ...
1
vote
2
answers
35
views
How to draw a hexagon with rounded corners on Android Canvas?
I want to make a hexagon with rounded corners, but I don't have any idea how to do it. I try it with different methods like: cubicTo, arcTo, etc.
My code to draw this
fun Path.customHexagon(radius: ...
0
votes
0
answers
13
views
Focusable items of LazyRow in Jetpack compose
I intend to write an app for Android TV using Jetpack Compose. I have a LazyRow containing several items. I want the background color and border of an item to change when it is hovered over. However, ...
0
votes
1
answer
16
views
How to clear TextField upon first focus in Jetpack Compose
I am wondering if anyone has tried to modify the value of text in a TextField Component upon clicking into it the first time. I.e. There is example text, you click on it and the text disappears, with ...
0
votes
0
answers
29
views
How to prevent a SharedFlow collect values when the activity resumes?
I have found an issue where SharedFlow does not collect values when the activity is open. So I set replay = 1, which worked fine initially.
However, I found that when the app is sent to the background ...
0
votes
1
answer
19
views
animateFloatAsState don't stop
I tried to rotate an Icon() using animateFloatAsState.
log("CurrentWeatherLayout", "refreshState:"+weatherInfo?.refreshState)
val rotation: Float by animateFloatAsState(
...
0
votes
0
answers
18
views
Android Compose M3 Button theming
Using Compose and Material3, can I theme buttons (or any other item)? For example, can I set the text color of buttons globally directly in my theme without setting it manually for every single button?...