https://kotlinlang.org
Join Slack
Hello everyone, After accompanist pager is deprecated what I use instead of it.
z

Zaki Shaikh

over 2 years ago
Hello everyone, After accompanist pager is deprecated what I use instead of it.
z
c
e
  • 3
  • 5
  • 370
Is the flag for `suppressKotlinVersionCompatibilityCheck` supposed to be the same with compose for w...
c

Carter

over 4 years ago
Is the flag for
suppressKotlinVersionCompatibilityCheck
supposed to be the same with compose for web? I tried
-P plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true
although it seems to have no effect (I still get the error about the version incompatibility).
👀 1
c
o
n
  • 3
  • 5
  • 370
Anyone knows why the "Reload all Gradle Projects" icon could be stuck in the "disabled" state?
m

mbonnin

almost 3 years ago
Anyone knows why the "Reload all Gradle Projects" icon could be stuck in the "disabled" state?
m
s
  • 2
  • 5
  • 369
is there a lwjgl like library thats kotlin-native ?
n

Nikky

over 7 years ago
is there a lwjgl like library thats kotlin-native ?
n
k
+3
  • 5
  • 14
  • 369
I’m using Lazycolumn inside ModalBottomSheet. But scrolling is not working smoothly. Sometimes scrol...
d

Dilip Sharma

9 months ago
I’m using Lazycolumn inside ModalBottomSheet. But scrolling is not working smoothly. Sometimes scrolling lazy column closing my bottomsheet.
d
a
  • 2
  • 2
  • 368
Hello! How can I display a snackbar on bottom of the screen when bottom sheet is displayed? I have t...
r

Rihards

almost 2 years ago
Hello! How can I display a snackbar on bottom of the screen when bottom sheet is displayed? I have tried many solutions, but none of them is working - all the time snackbar is displayed behind the bottom sheet. Bottom sheet I’m using is ModalBottomSheet provided by Material3. Is there anything scaffold specific I need to use to display snackbar in any situation?
r
d
  • 2
  • 2
  • 368
Hello everybody, not sure if that may be a MockK issue, but let’s start posting here and let’s see :...
d

Davide Giuseppe Farella

over 2 years ago
Hello everybody, not sure if that may be a MockK issue, but let’s start posting here and let’s see 🙂 I have a mapper that maps from
LazyPagingItems
to my model/state (I do that in the presenter, using Molecule, if you’re wondering) In order to test that, I created this convenience mock (since
LPI
has internal constructor)
fun <T : Any> mockLazyPagingItems(isEmpty: Boolean, refresh: LoadState): LazyPagingItems<T> = mockk {
    every { loadState } returns mockk loadState@{
        every { this@loadState.refresh } returns refresh
        every { this@loadState.append } returns LoadState.Loading
        every { this@loadState.prepend } returns LoadState.Loading
    }
    every { itemCount } returns if (isEmpty) 0 else 1
}
Updating to alpha19 I now have this exception (full stacktrace in thread)
java.lang.NullPointerException: Cannot invoke “androidx.compose.runtime.State.getValue()” because “$this$getValue$iv” is null
How would I fix that?
d
s
i
  • 3
  • 23
  • 368
I am trying to make an observable list, where I have a LiveData/StateFlow that emits the list whenev...
s

Sam Stone

over 2 years ago
I am trying to make an observable list, where I have a LiveData/StateFlow that emits the list whenever the list is mutated. I need the list to be iterable by multiple threads/coroutines. This is my signature:
class ObservableList<T>: MutableList<T> by Collections.synchronizedList(ArrayList()) {
But when I override a function, it gives an error: Abstract member cannot be accessed directly
override fun add(element: T): Boolean {
    val add = super.add(element)
    mObserver.postValue(this)
    return add
}
s
s
+2
  • 4
  • 14
  • 368
Hi, is there an update regarding `br` (Brotli) support in `ktor-client-encoding`? The only thing I c...
s

ste

over 3 years ago
Hi, is there an update regarding
br
(Brotli) support in
ktor-client-encoding
? The only thing I could find is https://github.com/ktorio/ktor/issues/408, but this is closed and the YouTrack link is broken
s
a
  • 2
  • 6
  • 368
Hey! I am trying to update an `AndroidView` based on my `CustomViewModel` changes. ```@Composable f...
p

Paulo Martins

about 4 years ago
Hey! I am trying to update an
AndroidView
based on my
CustomViewModel
changes.
@Composable
fun FilamentViewer(viewModel: CustomViewModel) {
    var modelViewer by remember { mutableStateOf<ModelViewer?>(null) }

    launchInComposition {
        while (true) {
            withFrameNanos { frameTimeNanos ->
                modelViewer?.render(frameTimeNanos)
            }
        }
    }

    AndroidView({ context ->
        LayoutInflater.from(context).inflate(
            R.layout.filament_host, FrameLayout(context), false
        ).apply {
            val (engine) = scenes[product.material]!!
            modelViewer = ModelViewer(engine, this as SurfaceView).also {
                setupModelViewer(it)
            }
        }
    })
}
how can I make it change dynamically? I need to update the modelViewer.scene entity
p
z
а
  • 3
  • 12
  • 368
Previous185186187Next

kotlinlang

A modern programming language that makes developers happier.

Powered by