Thread
#compose
    Christian

    Christian

    1 year ago
    Hi everyone, does anybody knew how to set gravity or align text to
    end
    ? basically, cursor starts from the right using
    BaseTextField
    jim

    jim

    1 year ago
    cc @Siyamed
    Siyamed

    Siyamed

    1 year ago
    it is TextAlign
    why do you want cursor to start from right?
    is it because of the language? do you want to move the cursor to end?
    Christian

    Christian

    1 year ago
    Hey @jim Thanks for tagging the right person! Hey @Siyamed, Yes! basically I want to start from the right to left, not specifically because of the language but it's the requirement. Like how I did on xml, I just set
    textAlignment
    to
    viewEnd
    @Siyamed, I believe
    TextAlign
    is only applicable on
    Text
    but not on
    BaseTextField
    Siyamed

    Siyamed

    1 year ago
    Got it. Can you please create a ticket about it? I would appreciate if you can describe the use case as well (in the ticket)
    Christian

    Christian

    1 year ago
    I already had created it yesterday! Here is the link https://issuetracker.google.com/170785134. Let me know if its all the use cases you need. Thank you! 🙏 🙇
    Hey @Siyamed I got it! I just want to put it out here for anyone who will encounter next! Thank you
    Column(with(ColumnScope) {
        Modifier.weight(1f)
    }
    ) {
        BaseTextField(
            textStyle = TextStyle(textAlign = TextAlign.End),
            textColor = textColor,
            cursorColor = textColor,
            value = textState,
            onValueChange = {
                textState = it
            },
            modifier = Modifier.background(textField)
                .height(100.dp)
                .fillMaxWidth()
                .wrapContentSize(Alignment.BottomEnd)
        )
    }