Btn

img

1
2
3
4
5
6
7
8
@Composable
fun ButtonSample() {
    Button(onClick = {
        Log.d("====", "click button")
    }, colors = ButtonDefaults.buttonColors(Color.Red)){//紅色
        Text(text = "click")//字
    }
}

img

1
2
3
4
5
6
7
@Composable
fun ButtonSample() {
    //文字Button
    TextButton(onClick = { /*TODO*/ }) {
        Text(text = "test")
    }
}

img

1
2
3
4
5
6
@Composable
fun ButtonSample() {
    OutlinedButton(onClick = { /*TODO*/ }) {
        Text("test")
    }
}

results matching ""

    No results matching ""