hi, i opened a new project and my editor seems to...
# compose
a
hi, i opened a new project and my editor seems to give no preview for any function. how can i fix this?
1
g
I think it's because Text by itself doesn't have dimensions, wrap it in a Box or something and you'll see it
Copy code
Box {
        Text(text = "hello $text")
    }
a
no sure, it works on the default generated MainActivity:
never mind tho. it was somehow a problem with the kt file. i created a new kt file and it started to work😅
g
oh lol
a
btw is there any alternative for "textallcaps" attribute in compose?
i can always do "myString".toUpperCase() , before setting up in textfield, but i was wondering if i could make a generic style out of it
m
try to create a custom @Composable that shows strings Upper Cased
v
you can also use annotated string , if you want to make it like some complex upper or lower case letters in between string