https://kotlinlang.org
Join Slack
Does anyone use the ktfmt intellij plugin? It doesn't seem to work and just curious what people are ...
c

Colton Idle

over 4 years ago
Does anyone use the ktfmt intellij plugin? It doesn't seem to work and just curious what people are doing in the meantime while that gets resolved. Does no one else hit cmd ctrl L all the time like me? 😄
c
j
c
  • 3
  • 31
  • 565
How can you get a string from resources strings in a viewmodel? We don't have LocalContext or simila...
p

Pablo

10 months ago
How can you get a string from resources strings in a viewmodel? We don't have LocalContext or similar thing here, and I need to recover it, because I need to store in the appstate a string resource value with some parameters
p
c
+2
  • 4
  • 22
  • 564
Does Kotlin has a `sorted queue` that I can use for KMP project? Java has `PriorityQueue` but I can’...
l

Loe

over 2 years ago
Does Kotlin has a
sorted queue
that I can use for KMP project? Java has
PriorityQueue
but I can’t use that for KMP. This message suggests
ArrayQueue
but it doesn’t have a Comparator that I can override
l
j
+3
  • 5
  • 9
  • 564
Since I burned through my Junie quota for the month in no time, I'm thinking of giving local models ...
s

Stefan Oltmann

7 months ago
Since I burned through my Junie quota for the month in no time, I'm thinking of giving local models a shot. I’ve got an RTX 2080 and can run Deepseek-Coder R1 8B without much trouble. There are tons of options at ollama.com/search, and I’m sure some of them will run just fine on my setup. My question is: Can anyone recommend a good local model for Kotlin or something close to Junie's capabilities? Edit: Nevermind. Junie doesn't support local models. I believed that, but I fall for an UX issue.
s
p
d
  • 3
  • 16
  • 563
Hey guys I am using jetpack compose navigation. I am trying to pass arraylist and some changes accor...
v

Vivek Modi

over 3 years ago
Hey guys I am using jetpack compose navigation. I am trying to pass arraylist and some changes according to this stackoverflow. I am getting error + my value inside data class will drop as well. Can someone guide me, what I am doing wrong here? I am not adding imports, instead I'll add my class link in the name. NavigationGraph.kt
private const val NEAREST_RESULT_JSON = "nearestResultJson"

@Composable
internal fun NavigationGraph() {
    val navController = rememberNavController()
    NavHost(navController = navController, startDestination = ScreenRoute.Home.route) {
        composable(ScreenRoute.Home.route) {
            SetupMainActivityView { nearestResult ->
                val nearestResultJson = Uri.encode(Gson().toJson(nearestResult))
                navController.navigate(ScreenRoute.Result.route + "/{$nearestResultJson}")
            }
        }

        composable(
            ScreenRoute.Result.route + "/{$NEAREST_RESULT_JSON}",
            arguments = listOf(
                navArgument(NEAREST_RESULT_JSON) { type = NearestResultParamType() }
            )
        ) { backStackEntry ->
            ResultScreen(backStackEntry.arguments?.getParcelableArrayList(NEAREST_RESULT_JSON))
        }
    }
}
v
c
+2
  • 4
  • 34
  • 562
What warning do you have to suppress to still use a deprecated symbol with level `HIDDEN`? for `WAR...
l

Lukellmann

over 3 years ago
What warning do you have to suppress to still use a deprecated symbol with level
HIDDEN
? for
WARNING
and
ERROR
you can do this:
@Deprecated("w", level = DeprecationLevel.WARNING)
val w = "w"

@Deprecated("e", level = DeprecationLevel.ERROR)
val e = "e"

@Deprecated("h", level = DeprecationLevel.HIDDEN)
val h = "h"

println(@Suppress("DEPRECATION") w)
println(@Suppress("DEPRECATION_ERROR") e)
println(@Suppress("?? what goes here ??") h)
l
z
i
  • 3
  • 8
  • 562
Any way to show a bottom sheet dialog without adding `ModalBottomSheetLayout` as a root component to...
j

Joe Jensen

over 4 years ago
Any way to show a bottom sheet dialog without adding
ModalBottomSheetLayout
as a root component to the app? My use case: I have an existing app with bottom navigation implemented as a fragment, and I will slowly migrate each tab (each its own fragment) to jetpack compose. How would I render a bottom sheet on top of all that UI? There doesn't seem to be an equivalent to
AlertDialog
but for bottom sheets
j
t
+2
  • 4
  • 13
  • 562
How can i get screenshot of a specific composable in Compose Multiplatform? Any library which does t...
v

Vaibhav Jaiswal

over 1 year ago
How can i get screenshot of a specific composable in Compose Multiplatform? Any library which does that?
v
k
+3
  • 5
  • 11
  • 561
Hi, I want to be able to display fullscreen notification to display to the user when he reaches a km...
f

florent

over 2 years ago
Hi, I want to be able to display fullscreen notification to display to the user when he reaches a km while running. I noticed that Samsung does it with their app. I haven't found how they do it maybe you have more information about it. On mobile, you can by adding a fullscreenIntent to a notification but that doesn't seems to work on wear. Apparently it was possible to add an extend to a notification with a WearableExtender() but that has been removed on wear os 2.0 and doesn't do anything anymore. Was it replaced by something?
f
f
k
  • 3
  • 17
  • 561
Using `setContent` in an Activity seems to kill the ability to use `Activity.onTouchEvent()` Is thi...
c

Colton Idle

over 4 years ago
Using
setContent
in an Activity seems to kill the ability to use
Activity.onTouchEvent()
Is this a bug? 🧵
c
a
  • 2
  • 9
  • 561
Previous110111112Next

kotlinlang

A modern programming language that makes developers happier.

Powered by