https://kotlinlang.org
Join Slack
Does anyone know if there’s a way to disable the swipe away gesture on a ModalBottomSheetLayout? I ...
m

mattinger

almost 3 years ago
Does anyone know if there’s a way to disable the swipe away gesture on a ModalBottomSheetLayout? I can veto the change so that the sheet stays up, but id rather the user not be able to drag the content away in that case. why let them drag to dismiss if we’re just going to veto it anyway? A related question is that if i decide to allow a click outside or for them to swipe it away, is there a way to react that that?
m
c
j
  • 3
  • 10
  • 1110
I was just updating a project of mine and am now getting this error: `e: androidx.compose.compiler....
t

Tom Truyen

10 months 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
  • 1106
is there a table component for compose desktop? I built one using LazyGrid but the styling each cell...
l

Lawrence

about 3 years ago
is there a table component for compose desktop? I built one using LazyGrid but the styling each cell to style a row is not intuitive
l
j
+2
  • 4
  • 8
  • 1105
When I use AsyncImage from `coil` in a `lazyList` I see lags during scrolling because image needs so...
e

electrolobzik

over 1 year ago
When I use AsyncImage from
coil
in a
lazyList
I see lags during scrolling because image needs some time to load. Is it possible to somehow preload a couple of items in direction of scrolling to avoid that lags? I was not able to find any API for that.
e
u
+3
  • 5
  • 37
  • 1103
With Kotlin 1.8.0 is there an option to disable the yarn lock file check by passing a parameter?
h

hfhbd

over 2 years ago
With Kotlin 1.8.0 is there an option to disable the yarn lock file check by passing a parameter?
➕ 2
h
t
  • 2
  • 7
  • 1103
How do I make my page always in the center with the new `HorizontalPager` (foundation)? it is align...
d

Daniele Segato

over 1 year ago
How do I make my page always in the center with the new
HorizontalPager
(foundation)? it is aligning the current item always on the left, I want it always in the center see screenshot, code in thread
d
r
  • 2
  • 6
  • 1101
Is it possible to move cursor to end position in TextField with initial value? I set it to the end ...
l

Luis Daivid

over 3 years ago
Is it possible to move cursor to end position in TextField with initial value? I set it to the end of the text using TextFieldValue’s selection, and the cursor stays fixed at the last position even if the user clicks in the middle of the text. What I want is for the cursor to be positioned at the last position only when it is first focused, and the user should be able to move the cursor.
🙌 1
l
z
  • 2
  • 9
  • 1101
Hello, am getting this error, warning: default scripting plugin is disabled: The provided plugin org...
d

david dereba

about 2 years ago
Hello, am getting this error, warning: default scripting plugin is disabled: The provided plugin org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar is not compatible with this version of compiler error: unable to evaluate script, no scripting plugin loaded how can i solve this?
d
c
  • 2
  • 1
  • 1099
How can I use the TakePicture contract to take a picture and display it in Jetpack Compose? (Code in...
m

Mehdi Haghgoo

about 3 years ago
How can I use the TakePicture contract to take a picture and display it in Jetpack Compose? (Code in thread)
m
i
s
  • 3
  • 7
  • 1096
If I want to make a child coroutine scope for my Repository so that the coroutines it launches are t...
r

Ryan Smith

over 2 years ago
If I want to make a child coroutine scope for my Repository so that the coroutines it launches are tied to application lifecycle rather than that of a view model or something more narrow what is the correct way to do that? Something like this?
// MyRepository.kt
class MyRepository<T>(coroutineScope: CoroutineScope) {
    private val scope = couroutineScope + Dispatchers.Default
    private val dataSource: DataSource<T> = DataSource()

    fun add(newValue: T) {
        scope.launch {
            dataSource.new(newValue)
        }
    }
}

// Example usage in a Compose Desktop app
// Main.kt
@Composeable
@Preview
fun App() {
    val appScope = rememberCoroutineScope { Dispatchers.Main }
    val repository = MyRepository(appScope)
    MainScreen(repository)
}
r
c
  • 2
  • 9
  • 1096
Previous303132Next

kotlinlang

A modern programming language that makes developers happier.

Powered by