package, is it correct? Because in my case I'm getting "Unresolved reference" for Row or Column
P.S. Nevermind, it fixed the issue. Strange design idea for me. What if Jetpack-Compose devs want to add new elements in the future? Isn't it better to import the whole layout package once at all?
r
rkechols
01/05/2022, 12:26 AM
You can replace the last part of an import statement with a star/asterisk
*
to import everything from that package/namespace/etc.
https://kotlinlang.org/docs/packages.html#imports
I believe that's frowned upon (at the very least, I personally frown upon it) because it hides what is actually being imported from the coder and "floods" your file with extra names.
With Java/Kotlin imports, I just import every thing I need individually. Not as friendly for coders as the python import system, IMO, but here we are. IDE's are helpful, though. Jetbrains IDEs let you just do ALT+Enter to import the needed thing, or CTRL+ALT+O to clean up your imports
c
Colton Idle
01/05/2022, 5:25 AM
Also, since this is compose specific checkout #compose
i
Ihor Kviten
01/05/2022, 7:31 AM
Thank you! I got used to Python and Kotlin brings a whole bunch of new things for me. I've just finished Harvard's CS50 and chose Kotlin/Android for my final project. Compare to xml/views, I like the idea of making UI in coding way, like with UI frameworks so that's why I chose to learn Compose. I will follow guidelines and import everything individually.
c
Colton Idle
01/06/2022, 3:01 AM
nice. i could never get past like lesson 4 of that CS50. Way to go!