What do I need to import inorder to use fun someFu...
# android
What do I need to import inorder to use fun someFun(variable:Dp [<<= this thing here, the Dp])
not sure if you mean this:
Copy code
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
Dimension value representing device-independent pixels (dp) - the type is "Dp"; the extension function on Int is "dp" like 12.dp gives you the Int 12 converted to Dp.
Yeah, thats exactly what I was looking for. Searching api for android/compose/kotlin is a nightmare.
Non of the tut vids I watch covers which imports are needed, and when they do it doesn't last long through the series.
Is android studio not autocompleting for you?
✔️ 1
Not using Android Studio, using Android IDE on my phone.
Honestly, Android development and kotlin in general needs an api/programming reference site like https://en.cppreference.com/w/ , having every module on a seperate site is a nightmare.
well, there is Kotlin as a language https://kotlinlang.org/docs/home.html and Compose for the UI https://developer.android.com/jetpack/compose - I think they both have very good docs.
Androids docs are a sever disapointment, its only useful for people who use Android studio and its auto-import feature. You have to go down several layers of pages before you even get to the keywords and you don't know if its the keywords your even looking for. The search feature on the site is horrible as it doesn't have an api only search feature. The whole thing is top down backwards as you should go to the keyword you need and then find the import you need, not the other way around.
The codelabs are great except for them not covering the imports needed to get the code working.