提问人:christianalready 提问时间:11/15/2023 最后编辑:christianalready 更新时间:11/23/2023 访问量:30
如何改善撰写中大纲按钮的视图?
How to improve view of outlinedbutton in compose?
问:
当我单击元素并且它是焦点时,我的暗模式和背景有问题。 我找不到哪个更改了电子邮件文本标签的背景?
class TextFieldColors internal constructor(
private val focusedTextColor: Color,
private val unfocusedTextColor: Color,
private val disabledTextColor: Color,
private val errorTextColor: Color,
private val focusedContainerColor: Color,
private val unfocusedContainerColor: Color,
private val disabledContainerColor: Color,
private val errorContainerColor: Color,
private val cursorColor: Color,
private val errorCursorColor: Color,
private val textSelectionColors: TextSelectionColors,
private val focusedIndicatorColor: Color,
private val unfocusedIndicatorColor: Color,
private val disabledIndicatorColor: Color,
private val errorIndicatorColor: Color,
private val focusedLeadingIconColor: Color,
private val unfocusedLeadingIconColor: Color,
private val disabledLeadingIconColor: Color,
private val errorLeadingIconColor: Color,
private val focusedTrailingIconColor: Color,
private val unfocusedTrailingIconColor: Color,
private val disabledTrailingIconColor: Color,
private val errorTrailingIconColor: Color,
private val focusedLabelColor: Color,
private val unfocusedLabelColor: Color,
private val disabledLabelColor: Color,
private val errorLabelColor: Color,
private val focusedPlaceholderColor: Color,
private val unfocusedPlaceholderColor: Color,
private val disabledPlaceholderColor: Color,
private val errorPlaceholderColor: Color,
private val focusedSupportingTextColor: Color,
private val unfocusedSupportingTextColor: Color,
private val disabledSupportingTextColor: Color,
private val errorSupportingTextColor: Color,
private val focusedPrefixColor: Color,
private val unfocusedPrefixColor: Color,
private val disabledPrefixColor: Color,
private val errorPrefixColor: Color,
private val focusedSuffixColor: Color,
private val unfocusedSuffixColor: Color,
private val disabledSuffixColor: Color,
private val errorSuffixColor: Color,
) {
我已经测试了几乎所有的,但我找不到它。
例:
textFieldDefault: TextFieldColors = OutlinedTextFieldDefaults.colors(
disabledTextColor = Color.Gray,
focusedContainerColor = Color.White,
unfocusedContainerColor = Color.White,
disabledContainerColor = Color.White,
focusedSuffixColor = Color.Green,
cursorColor = Color.Black,
disabledBorderColor = if (isInputError) Color.Red else Color.Gray,
disabledLabelColor = Color.Blue,
),
textFieldError: TextFieldColors = OutlinedTextFieldDefaults.colors(
errorBorderColor = Color.Red,
unfocusedLeadingIconColor = Color.Red,
focusedLeadingIconColor = Color.Red,
cursorColor = Color.Gray,
focusedBorderColor = Color.Red,
unfocusedBorderColor = Color.Red
),
OutlinedTextField(
value = value,
onValueChange = {
onValueChange(it)
},
modifier = Modifier.fillMaxWidth(),
colors = if (!isInputError) textFieldDefault else textFieldError,
shape = RoundedCornerShape(8.dp),
singleLine = true,
[...]
这是代码,因为我主要寻求代码帮助。
答: 暂无答案
上一个:如何通过颜色平滑地编码二维位置
下一个:色度坐标的主波长计算器
评论