FocusedLabelColor von TextField kann nicht festgelegt werden, ohne FocusedTextColor anzugeben

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: FocusedLabelColor von TextField kann nicht festgelegt werden, ohne FocusedTextColor anzugeben

by Guest » 11 Jan 2025, 11:36

In einem neuen Android Compose-Projekt mit material3 versuche ich, focusLabelColor von OutlinedTextField wie folgt festzulegen, aber es hat nicht funktioniert, es sei denn, ich habe die Farbe für Text festgelegt.

Code: Select all

OutlinedTextField(
label = { Text("Label") },
colors =
OutlinedTextFieldDefaults.colors(
focusedLabelColor = Color.Blue,
focusedTextColor = Color.Red, // necessary for focusedLabelColor to have an effect
),
value = "",
onValueChange = {},
)
Ich habe es satt, Farben für TextField festzulegen und es hat auch nicht funktioniert.

Top