What do you want to save?
Add Code snippet
New code examples in category Kotlin
-
Ttw 2021-08-30 15:32:01
search bar android studio kotlin
override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.search_menu, menu) val searchItem: MenuItem = menu.findItem(R.id.action_search) if (searchItem != null) { searchView = MenuItemCompat.getActionView(searchI... Add solution -
LeKhoi 2021-08-30 06:15:02
get timestamp kotlin
Kotlin doesn't have any time handling classes of its own, so you just use Java's java.time. For an ISO-8601 timestamp (which is the preferred format): DateTimeFormatter.ISO_INSTANT.format(Instant.now()) That will return 2018-04-16T17:00:08.746Z. For your... Add solution -
Banci Gurjar 2021-08-30 01:45:02
object kotlin
val helloWorld = object { val hello = "Hello" val world = "World" // object expressions extend Any, so `override` is required on `toString()` override fun toString() = "" } print(helloWorld.hello+ " "... Add solution