Questions tagged [android-jetpack-compose-button]
The android-jetpack-compose-button tag has no usage guidance.
33
questions
5
votes
1
answer
58
views
How do I make a Text composable take up x% of the Row's width when there's a IconButton in the row?
I have a Row that has an icon button on the left, then 16dp padding, then a Text that takes up the remaining width in the Row, and finally on the right, another Text that should take up 25% of the ...
1
vote
0
answers
48
views
How to add a default ripple effect to buttons in an Android app?
I'm an iOS developer, but currently working on an Android app and found inconsistencies in the default ripple effect behavior on buttons across different devices.
On my testing device, an LG VELVET ...
0
votes
1
answer
69
views
How to make changes to composable when the said composable is clicked on
I have a composable -
@Composable
fun ButtonBar(items: List<ActionButtons>) {
AppTheme {
LazyRow(
contentPadding = PaddingValues(horizontal = 8.dp),
) {
...
1
vote
0
answers
231
views
I want to add Figma Linear gradient to Jetpack Compose Linear Gradient
I use a Figma design to develop a android app using Jetpack Compose. I want to add a linear gradient to a button like in Figma design.
This is my Jetpack compose code. When I use this code the ...
0
votes
2
answers
224
views
Android Compose contraintLayout has a text inside, which if it's long -> it will go out of it's parent
This is my code:
@Preview
@Composable
private fun composable(){
ConstraintLayout(
modifier = Modifier
.padding(all = 8.dp)
) {
val (title, type) = createRefs()
...
0
votes
0
answers
143
views
Using compose bom in library results in resolved empty version in a non-bom module
I'm working on a library Central Compose Library that uses Compose BOM version 2023.05.01. We also have a library Small Team Library, which is not on Compose BOM, that depends on the Central Compose ...
0
votes
0
answers
43
views
The navigation keys of the device vibrate when opening the Jetpack Compose Dropdown Menu
When the Dropdown Menu is opened, there is a flicker in the navigation keys. When I create a new application with the same codes, there is no problem, but this flicker occurs in my current application....
0
votes
1
answer
1k
views
Jetpack compose text field cleared when non-compose state is read
I have a Jetpack compose form, created from this tutorial. It shows errors nicely by validating the form when you click the submit button. I want the button on my form to be dynamically enabled, using ...
3
votes
2
answers
4k
views
Jetpack compose: customize radio button group to achieve segmented buttons
iOS has Segmented controls like this.
I wanna have this in Android by using jetpack compose and I checked there is not build-in like this, and this UI in material 3 doesn't support jetpack compose now....
1
vote
2
answers
334
views
Make a button Unclickable from onClick
I am trying to use Compose and Kotlin in this code to make the button unclickable when counter == 3.
When I run the code and counter presumably is 3, the button stays clickable and wont change to ...
5
votes
2
answers
2k
views
How to change the color of ripple effect of a Button
For some reason, I'm unable to change the color of the ripple effect of a Button. What am I doing wrong here?
androidx.compose.material.Button(
onClick = onClick,
modifier = modifier
....
1
vote
1
answer
633
views
Change the ripple of the IconButton
how I can fix this
@Composable
fun Body() {
val scrollState = rememberScrollState()
Column(
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = ...
4
votes
1
answer
918
views
Can I put animation fade in with duration between button state enable and disable in jetpack compose?
This is how i create my button in compose
Button(
modifier = modifier,
enabled = enabled.value,
onClick = {}
) {
Text(text = text)
}
6
votes
2
answers
2k
views
How to use weight in a Button to align Text on the left and Icon on the right
I'm building a re-usable Button component in Jetpack Compose, which is basically a Row. The button should have a text on the left end and an icon on the right end. This works straight forward like ...
3
votes
1
answer
5k
views
How to handle border and background in compose shape?
In the code the image border only on the sides, not on the corners.
for the button, the background goes out of the shape/border.
I only managed to "fix" the button by using a fixed height ...