Questions tagged [android-jetpack-compose-ui]

37 questions
0
votes
0 answers

Does it make sense to put an InlineMap within a remember block in jetpack compose?

val arrowUp = rememberVectorPainter(image = ImageVector.vectorResource(R.drawable.ds_icon_arrowup)) val arrowDown = rememberVectorPainter(image = ImageVector.vectorResource(R.drawable.ds_icon_arrowdown)) val arrowRight =…
0
votes
0 answers

Detect Click Event for each Arch in Doughnut : Jetpack ComposeUI Doughnut Chart. Kotlin

I have Doughnut chart with dynamic values. If user click on any circle(drawArch). Specific position should be print. Here is My Compose Code @Composable fun DoughnutChart1( values: List = listOf(65f, 40f, 25f, 20f), colors:…
Deepak Ror
  • 2,084
  • 2
  • 20
  • 26
0
votes
1 answer

Jetpack Compose: Why is LocalConfiguration.current.screenWidthDp an Int and not a Float?

It seems having LocalConfiguration.current.screenWidthDp be an Int makes conversions from dp to pixels less accurate. For example, for a device with density 420 and width in pixels of 1080, the width in dp = 1080 * 160/420 = 411.4285714. However, if…
0
votes
0 answers

Manage visibility with Compose UI

i´m new in Compose and i´m trying to manage the visibility of the TopBar when i´m scrolling a list ( LazyColumn ). I´m not pretend to use the Scaffold with Material 3 because I want to learn a bit more about Compose and Animation. So, first of all,…
0
votes
1 answer

How to make divider line fill width in ScrollableTabRow with two tabs

How to make divider line fill width in ScrollableTabRow with two tabs in compose I made Modifier.fillMaxWidth() for ScrollableTabRow but it didn't help It shows only two tabs as wrapContent Here is my code ScrollableTabRow( modifier =…
0
votes
0 answers

Is there a way to allow negative decimals for TextField in Jetpack Compose on all Android versions?

I'm trying to use an OutlinedTextField that allows both negative & positive decimal numbers. Currently, I have this code to change the keyboard type: keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal, imeAction =…
0
votes
1 answer

how to set onClickListener on words of string in a textField in compose UI

Actually I'm developing an social-media app where I want that my user can mention more than one user in between of their compliment string just like in Instagram comment section... on which if someOne tap of their username... it'll lead them to…
1 2
3