https://kotlinlang.org
Join Slack
How do I make a composable fill remaining space in a `Column`? Tried `fillMaxHeight` but that takes ...
m

Michael Elgavi

over 4 years ago
How do I make a composable fill remaining space in a
Column
? Tried
fillMaxHeight
but that takes up the entire column
m
a
+2
  • 4
  • 10
  • 1691
Hello everyone. I am trying to change a variable in a singleton and the IDE displayed me the followi...
f

Francis Mariano

about 3 years ago
Hello everyone. I am trying to change a variable in a singleton and the IDE displayed me the following message:
With old Native GC, variable in singleton without @ThreadLocal can't be changed after initialization
. Are there a new Native GC ????
f
m
k
  • 3
  • 3
  • 1689
How do we configure serialization now with Ktor 2.0 on an Android client? This example for previous...
n

Nathan Kleinschmidt

about 3 years ago
How do we configure serialization now with Ktor 2.0 on an Android client? This example for previous versions is deprecated and no longer works:
client = HttpClient(Android) {
    install(JsonFeature) {
      serializer = KotlinxSerializer()
    }
}
The migration guide says to use the content negotiation plugin, but there are no examples of how to do this on Android that I can see.
n
d
+3
  • 5
  • 11
  • 1687
How to correctly pass parameters with Compose navigation if you must use enums for the routes? In th...
p

Pablo

over 1 year ago
How to correctly pass parameters with Compose navigation if you must use enums for the routes? In the docu they show you this example for passing parameters:
NavHost(startDestination = "profile/{userId}") {
    composable("profile/{userId}")
}
But how to work with enums for the routers? in previous codelabs and docu they told you that you must use enums for the routes:
NavHost(startDestination = Screen.HomeScreen.name) {
    composable(Screen.HomeScreen.name)
}
How to pass parameters correctly using enums for the routes? How to add that userId parameter if you use an enum for the route?
p
s
  • 2
  • 46
  • 1657
Are there hot reload in android native kotlin for android studio 4.2, if there aren't so when we get...
o

onirutlA

about 4 years ago
Are there hot reload in android native kotlin for android studio 4.2, if there aren't so when we get hot reload?
o
c
  • 2
  • 2
  • 1655
is there an official openapi-generator for kotlin ktor client?
x

xxfast

over 3 years ago
is there an official openapi-generator for kotlin ktor client?
✅ 1
x
a
+3
  • 5
  • 7
  • 1652
Unable to mock the methods from `object` class using `Mockito`. Tried the same with `Mockk` it’s wor...
s

Suraj Bokey

over 2 years ago
Unable to mock the methods from
object
class using
Mockito
. Tried the same with
Mockk
it’s working. Anyone tried doing this with
Mockito
?
s
m
  • 2
  • 4
  • 1647
I’m trying to upload an Image from a Compose Multiplatform via Ktor. I have the image data as ImageB...
m

msomu

over 1 year ago
I’m trying to upload an Image from a Compose Multiplatform via Ktor. I have the image data as ImageBitmap object how can I convert it into a Bitmap so that i can upload via Ktor? When I tried to change the
androidx.compose.ui.graphics.ImageBitmap
into a
org.jetbrains.skia.Bitmap
using
asSkiaBitmap
I’m getting this error
Unresolved reference: asSkiaBitmap
Any help on resolving how to use
asSkiaBitmap()
function in the
commonMain
module?
m
a
+3
  • 5
  • 9
  • 1630
Hello everyone, How could I center / align the icon on the left to the middle of the first line (not...
i

iroyo

about 2 years ago
Hello everyone, How could I center / align the icon on the left to the middle of the first line (not the basline of the first line)? With one line is very easy but if you add more..
@Preview
@Preview(fontScale = 3f)
@Composable
fun TestCheckbox2() {
    Row(verticalAlignment = Alignment.CenterVertically) {
        Icon(
            painter = painterResource(id = R.drawable.ic_checkbox_checked), contentDescription = null,
        )
        Text(
            text = "Line 1\nline2",
        )
    }
}
I one to avoid using a constraint layout and add “invisible” lines to align it. First image what I have, second image what I want to achieve
i
t
+3
  • 5
  • 10
  • 1630
Is it good to have a use case depending on another use case where the other use case is just forward...
v

Vikas Singh

almost 3 years ago
Is it good to have a use case depending on another use case where the other use case is just forwarding the calls to the repository ?
v
m
+5
  • 7
  • 13
  • 1630
Previous131415Next

kotlinlang

A modern programming language that makes developers happier.

Powered by