https://kotlinlang.org
Join Slack
How can I avoid ModalBottomSheet from full expanding when using `sheetState.show()`? I would like to...
r

Rihards

almost 3 years ago
How can I avoid ModalBottomSheet from full expanding when using
sheetState.show()
? I would like to get it half expanded when user opens it. I tried to use
scope.launch { sheetState.animateTo(ModalBottomSheetValue.HalfExpanded) }
, but then app is crashing.
✅ 1
r
j
+2
  • 4
  • 9
  • 1907
Is there an Android-provided way to convert a Spanned string into an AnnotatedString? Alternatively,...
b

Ben Powell

almost 3 years ago
Is there an Android-provided way to convert a Spanned string into an AnnotatedString? Alternatively, can I read a string resource as an AnnotatedString? I say “Android-provided” because while there are plenty of homegrown converters out there, and even a partial SpanStyle converter in the Compose source code, I’d prefer a complete and maintained solution.
b
e
a
  • 3
  • 3
  • 1905
I was just updating a project of mine and am now getting this error: `e: androidx.compose.compiler....
t

Tom Truyen

over 1 year ago
I was just updating a project of mine and am now getting this error:
e: androidx.compose.compiler.plugins.kotlin.IncompatibleComposeRuntimeVersionException: The Compose Compiler requires the Compose Runtime to be on the class path, but none could be found. The compose compiler plugin you are using (version 1.5.14) expects a minimum runtime version of 1.0.0.
I don't understand why this is happening since I have updated projects before without a problem. I am attempting to upgrade to Kotlin 2.0.20. I have applied the
org.jetbrains.kotlin.plugin.compose
to my project build.gradle and to my modules via convention plugins
libs.versions.toml
✅ 1
t
m
b
  • 3
  • 31
  • 1891
Is there any practical way to load SVG files on Compose/iOS at the moment? I can see the `Image`/`Im...
d

darkmoon_uk

over 3 years ago
Is there any practical way to load SVG files on Compose/iOS at the moment? I can see the `Image`/`ImageVector`/`vectorPainter` API set is present - any existing code to get SVG format loaded into that?
d
m
+2
  • 4
  • 10
  • 1884
Hello! How can I make image from byte array?
p

PHondogo

about 3 years ago
Hello! How can I make image from byte array?
K 1
p
m
  • 2
  • 2
  • 1872
Hello everyone, How could I center / align the icon on the left to the middle of the first line (not...
i

iroyo

over 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
  • 1867
What’s the difference between using ```every {} returns something``` and ```every {} answers {someth...
v

voben

almost 6 years ago
What’s the difference between using
every {} returns something
and
every {} answers {something}
v
s
+4
  • 6
  • 6
  • 1865
Hi all - New to gradle. I’m sure I’m doing something silly, but I’m trying to add a jar building cap...
m

Muhammad Talha

over 3 years ago
Hi all - New to gradle. I’m sure I’m doing something silly, but I’m trying to add a jar building capability to my gradle file. But I’m getting an error:
Expression 'jar' cannot be invoked as a function. The function 'invoke()' is not found
. I already added the
java
plugin in the
plugins
function. Would any one be able to provide some guidance? Thanks!
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "1.6.21"
    java
    application
}

group = "me.talha"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
}

dependencies {
    testImplementation(kotlin("test"))
}

tasks.test {
    useJUnitPlatform()
}

tasks.withType<KotlinCompile>() {
    kotlinOptions.jvmTarget = "11"
}

application {
    mainClass.set("MainKt")
}

jar {
    manifest {
        attributes 'Main-Class': 'MainKt'
    }
}
m
v
e
  • 3
  • 16
  • 1864
How to animate item placements in `FlowRow`?
m

Mark

over 2 years ago
How to animate item placements in
FlowRow
?
m
u
+4
  • 6
  • 28
  • 1855
is there an official openapi-generator for kotlin ktor client?
x

xxfast

almost 4 years ago
is there an official openapi-generator for kotlin ktor client?
✅ 1
x
a
+3
  • 5
  • 7
  • 1855
Previous121314Next

kotlinlang

A modern programming language that makes developers happier.

Powered by