android-jetpack-compose-button Questions
3
Solved
I am trying to create a circular OutlinedButton with an icon in the center without text.
OutlinedButton(onClick = { /*TODO*/ },
shape = CircleShape,
border= BorderStroke(1.dp, Color.Blue)
) {
...
Commix asked 17/3, 2021 at 11:10
6
I find listeners for onClick and onLongClick and even onPress but there is no event/listener for something like buttonDown and buttonUp, or onPress and onRelease.
Am I missing something? My current...
Milomilon asked 21/3, 2022 at 9:58
6
Solved
How can we achieve this in jetpack compose
I'm doing something like this
Button(
elevation = ButtonDefaults.elevation(
defaultElevation = 0.dp,
pressedElevation = 8.dp,
disabledElevation = 0.d...
androidandroid-jetpack-composeandroid-compose-textfieldandroid-compose-buttonandroid-jetpack-compose-button
Marinelli asked 22/5, 2022 at 10:58
3
Solved
How do I change the background color of a button on click?
Runstadler asked 4/2, 2021 at 15:25
4
Solved
How can I change the ripple color of an IconButton?
I tried doing it this way, but it doesn't change:
IconButton(
onClick = { onClick() },
modifier = Modifier.clickable(
onClick = { onClick() },...
Rustin asked 26/4, 2021 at 10:54
2
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
.indication...
Grantham asked 17/1, 2023 at 19:21
4
Solved
I am trying to build the following component,
Following is my code,
Button(onClick = { /*TODO*/ }, modifier = Modifier.fillMaxWidth()) {
Image(painter = painterResource(id = R.drawable.ic_check_c...
Germano asked 22/9, 2021 at 3:17
3
Solved
I am trying to align the icon of a button to the left and keep the text centered. Any ideas how this can be achieved?
My composable:
@Composable
fun CustomButton() {
MaterialTheme {
OutlinedBut...
Arabeila asked 13/3, 2021 at 16:2
2
Solved
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 ...
Bombsight asked 23/8, 2022 at 6:57
4
Solved
I am trying to remove padding from TextButton but it wont work.
TextButton(
onClick = {},
modifier = Modifier.padding(0.dp)
) {
Text(
" ${getString(R.string.terms_and_conditions)}",
...
Mountebank asked 8/9, 2021 at 6:33
2
Solved
As solved here, I disable the tap flashing by setting the indication to null.
However, this is not working for Button or Icons?!
Chaney asked 22/3, 2022 at 10:12
2
Solved
I want to create button where I have only text and icon and all background and borders are transparent. I create something like that:
OutlinedButton(
colors = ButtonDefaults.buttonColors(backgroun...
Kilgore asked 3/12, 2021 at 9:14
2
Solved
Unable to reduce the huge padding in OutlinedButton. Tried contentPadding, modifier padding, etc. Cannot reduce padding for text "apple". Any idea? Should I use any other type of compose ...
Equites asked 13/9, 2021 at 1:51
2
I have button to record voice so I want it to start record when user press it and stop when he leave it
@Composable
fun Screen(){
Button(){
Text("record")
}
}
Morelos asked 13/9, 2021 at 2:25
1
Solved
I am trying to create a custom button that is small and can show a numerical value between 0 and 99 as Text. Depending on the fontsize the Text disappears from the Button when the size of the Butto...
Frogfish asked 10/8, 2021 at 10:29
2
Solved
Let's say I have a Composable like this :
@Composable
fun LoadingButton() {
val (isLoading, setIsLoading) = state { false }
Button(
onClick = setIsLoading,
text = {
if (isLoading) {
Text(te...
Placid asked 14/6, 2020 at 18:25
1
© 2022 - 2024 — McMap. All rights reserved.