I am currently not concerned with commands, or any sort of restriction concerning user input. I was hoping if somebody could point me out in as to what controls should I use to just have a prompt and the user input anything. Should I use a textfield and make it the same color in my styles files?
I learned java basics through AP CSA last year and I’m having a hard time learning kotlin in android development class this year. I don’t get how each functions work in android development at all. Can you recommend some sources teaching kotlin basics? Books are also good.
tl/dr; First real project with kotlin, wondering for best practices for code organization.
Hi there, I’m working on my first Kotlin project (coming from Java).
The system is pretty basic, right now all I have is a couple of data classes (value objects) with the corresponding repositories.
For those I have two files, model.kt and repositories.kt.
Back in Java (with the one file one class rule) I would make a model package and a persistence package. Trying to keep that sense of order I have made the packages, but there’s a single file on each with multiple (simple) classes. (Each of those have 20 lines or less).
Right now I feel that the packages (as a directory structure) are not needed, but having all my files on the root directory feels wrong. But, again, I don’t know if that’s just some kind of stockholm syndrome.
Any suggestion will be appreciated.
I open-sourced this repo by me demonstrating how you can get started with Machine Learning in Android 11 with Kotlin, all that is new. I further even explain how the code works so you can very easily get started with implementing Machine Learning in your Android apps with cool examples!
(PS: Leave me a star if this looks good to you, helps me a lot.)
Hey, I’ve been using Kotlin in the JVM for a few years and I decided to try it on nodejs (I’m also working with node for a few years, so I’m not newbie in the platform).
I went to IDEA > New Project > Gradle > Kotlin (NodeJS). Added a few dependencies and enable the experimental Dukat:
Both firebase and left-pad (obviously I’m using this for test) does have typescript mappings, so the kotlin mappings should be generated, right?
I refreshed Gradle and went to the src/main trying to import the dependencies, but nothing happened and I don’t know why. Looking at build/js/node_modules the dependencies are there.
I tried to run the Dukat gradle tasks and nothing happened too.
This section about external dependencies is very bad documented, I need some help to set it up.
btw I’m on Kotlin 1.4, my full build.gradle looks like this:
Thank you all, hope I will be using this in production soon
SOLUTION: I’m stupid and can’t read documentations: https://kotlinlang.org/docs/reference/js-external-declarations-with-dukat.html#generating-external-declarations-at-build-time
Does anyone have some idea how to use createPortal in kotlin-react for example to render a modal? i have tried several ways and nothing is working. I´m new at Kotlin. Here is one way i tryed:
its just how its working in good old TS and i tried to transfer it to kotlin-react but createPortal seems to do nothing in this case.
It would be nice if some could give me an example of how implement this example correct in react-kotlin.