https://kotlinlang.org logo
Title
z

zhagnfei

08/19/2021, 6:51 AM
TextField(
        value = feedContent.observeAsState().value ?: "",
        onValueChange = {
            if (it.length <= 200) {
                feedContent.value = it
            }
        },
        maxLines = 4,
        colors = textFieldColors(
                textColor = colorResource(id = R.color.color_22BE8C),
                cursorColor = colorResource(id = R.color.colorPrimary),
                backgroundColor = colorResource(id = R.color.color_f1f3f7),
                focusedIndicatorColor = Color.Transparent,
                unfocusedIndicatorColor = Color.Transparent,
                disabledIndicatorColor = Color.Transparent
        ),
        shape = RoundedCornerShape(6.dp),
        placeholder = {
            Text(text = stringResource(id = R.string.feedback_input_desc),
                    modifier = Modifier.wrapContentSize(),
                    color = colorResource(id = R.color.color_BBBBC3), fontSize = 14.sp)
        },
        modifier = Modifier
                .fillMaxWidth()
                .wrapContentHeight(align = <http://Alignment.Top|Alignment.Top>)
                .padding(top = 20.dp)
                .background(Color(0xF1F3F7), RoundedCornerShape(6.dp)),
)
why show the textcolor is colorPrimary????
a

annsofi

08/19/2021, 6:52 AM
the cursor color is
colorPrimary
, the text color is
R.color.color_22BE8C
z

zhagnfei

08/19/2021, 6:53 AM
but text color is colorPrimary in phone
a

annsofi

08/19/2021, 6:58 AM
so you’re saying that this is how you want it to be, but not how it looks? How about a screen shot to explain it?
z

zhagnfei

08/19/2021, 7:00 AM
I'm sorry that the colorPrimary was modified by someone else
a

annsofi

08/19/2021, 7:01 AM
well, at least you found the issue 🙂
z

zhagnfei

08/19/2021, 7:02 AM
yes , so sorry !!!thank you
👍 1
c

Colton Idle

08/19/2021, 7:15 AM
@zhagnfei can you edit your post to put the code in this thread please? https://kotlinlang.slack.com/archives/CJLTWPH7S/p1616265877303000