https://kotlinlang.org
Join Slack
Do you know how to import custom font for iOS Multiplatform? ```val rubikFamily = FontFamily( f...
r

Renaud

over 2 years ago
Do you know how to import custom font for iOS Multiplatform?
val rubikFamily = FontFamily(
    fonts = listOf(
        Font(
            resId = "font/rubik_italic.ttf", // Need R.
            weight = FontWeight.W400,
        )
    )
)
r
a
+4
  • 6
  • 21
  • 546
Another problem. Updated the Kotlin plugin to 1.8.20, now all my build.gradle.kts are broken, it fai...
r

robstoll

over 2 years ago
Another problem. Updated the Kotlin plugin to 1.8.20, now all my build.gradle.kts are broken, it fails with:
Can't find built-in class kotlin.Cloneable
I get the error around every 2 seconds. Is there a workaround next do downgrade the plugin?
r
a
  • 2
  • 2
  • 546
I want to remember scroll state across configuration changes within a Text with modifier `.verticalS...
r

Rick Regan

almost 4 years ago
I want to remember scroll state across configuration changes within a Text with modifier
.verticalScroll(scrollState)
. •
val scrollState = rememberScrollState()
does not survive a configuration change. •
val scrollState = rememberSaveable { ScrollState(0) }
gets an exception "ScrollState@fb46372 cannot be saved using the current SaveableStateRegistry". •
val scrollState = ScrollState(0)
globally outside of any Composable works, but this is putting the scroll state outside the scope of the Composable. Is it OK to do that? Is there another way?
r
i
  • 2
  • 11
  • 546
Is there a recommend method to unit test JSON in Kotlin? Like, asserting if one json string is equal...
a

Ayomide

over 4 years ago
Is there a recommend method to unit test JSON in Kotlin? Like, asserting if one json string is equal to the other
a
c
  • 2
  • 3
  • 546
Is there any way to customize the Material 3 DatePicker sizes? That thing is really huge on small sc...
s

Stefan Oltmann

almost 2 years ago
Is there any way to customize the Material 3 DatePicker sizes? That thing is really huge on small screens like the iPhone 12 Mini. 7 buttons for the weekdays don't fit on the screen if everyone is 48.dp and also has some padding. I want to remove the padding and reduce the button sizes to 44.dp or 40.dp. It seems not possible. Is it?
s
a
+2
  • 4
  • 11
  • 545
I'm having issues setting up migrations in sqldelight (`1.5.5`) i have a table `media` and i want t...
r

Robert Munro

over 2 years ago
I'm having issues setting up migrations in sqldelight (
1.5.5
) i have a table
media
and i want to alter it to add a column (
broadcast_date
) so i have 1.sqm
ALTER TABLE media ADD COLUMN broadcast_date TEXT DEFAULT NULL;
i have turned on
deriveSchemaFromMigrations = true
in
build.gradle.kts
but when building, it tries to run the alter table command before the schema in the .sq files? (error output in thread) just wondering if thats the best way to do migrations? source is here: https://github.com/sentinelweb/cuer/tree/feature/196-upcoming-videos/database/src/commonMain/sqldelight/uk/co/sentinelweb/cuer/database
r
l
  • 2
  • 6
  • 545
I'm using a M1 MPB and IntelliJ becomes unusably slow when I'm screen sharing it in Google Meet. It'...
r

Ruben Holen

over 1 year ago
I'm using a M1 MPB and IntelliJ becomes unusably slow when I'm screen sharing it in Google Meet. It's extremely laggy when typing or even just moving the caret, sometimes freezing for 10+ seconds. Does anyone know what's causing this?
r
c
+2
  • 4
  • 5
  • 544
why is `text` underlined? When I hover over it in android studio it says `Wrapped into a reference o...
r

Ray Rahke

almost 2 years ago
why is
text
underlined? When I hover over it in android studio it says
Wrapped into a reference object to be modified when captured in a closure
. Is this a problem?
r
n
  • 2
  • 2
  • 544
what is a good way to add a shutdownhook to ktor application? In my understanding, since Runtime.ge...
s

subrat prasad

over 2 years ago
what is a good way to add a shutdownhook to ktor application? In my understanding, since Runtime.getRuntime().addShutdownHook requires you to use thread directly, it is not recommended.
s
z
a
  • 3
  • 8
  • 544
Hi, is LocalConfiguration available in compose multiplatform? if not, what is the correct way to ge...
s

Sunil Kumar

over 2 years ago
Hi, is LocalConfiguration available in compose multiplatform? if not, what is the correct way to get screen width and height in common module that will work for all platforms?
s
p
  • 2
  • 7
  • 544
Previous115116117Next

kotlinlang

A modern programming language that makes developers happier.

Powered by