https://kotlinlang.org
Join Slack
hey guys, is there a way to create a `const` list/array inside a companion object in kotlin?
r

Raed Ghazal

over 4 years ago
hey guys, is there a way to create a
const
list/array inside a companion object in kotlin?
🚫 1
r
i
  • 2
  • 2
  • 1133
Running in to issue with combination it seems of Jetpack Compose 1.7.0-beta and CMP 1.6.10. I'm usi...
j

John O'Reilly

over 1 year ago
Running in to issue with combination it seems of Jetpack Compose 1.7.0-beta and CMP 1.6.10. I'm using
HorizontalPager
in shared compose code and am getting
java.lang.NoSuchMethodError: No static method HorizontalPager...
crash. I have to use that 1.7 bera due in turn to dependency on lifecycle 2.8.. I also tried 1.6.20-dev1663 but still get same issue
j
a
+2
  • 4
  • 6
  • 1131
What could cause this exception? (thread)
j

Jan

over 3 years ago
What could cause this exception? (thread)
j
n
  • 2
  • 6
  • 1130
i can't invoke the composable function inside of button onclick.and, I getting this error '@Composab...
p

Praveen Kumar

over 2 years ago
i can't invoke the composable function inside of button onclick.and, I getting this error '@Composable invocations can only happen from the context of a @Composable function'
p
s
  • 2
  • 20
  • 1126
Is there a way to draw outside of a composables bounds? Or to render a nested composable on top of (...
a

Alex

about 3 years ago
Is there a way to draw outside of a composables bounds? Or to render a nested composable on top of (higher z-Index) as a composable that has a different parent? e.g.
Box {
  Box { 
    Composable1() <-- render this "on top of" (higher zIndex) Composable2
  }
  Composable2()
}
a
o
s
  • 3
  • 4
  • 1126
Has anyone been able to successfully use FlowRow and alignment? Seems like it's not possible to vert...
c

Colton Idle

over 2 years ago
Has anyone been able to successfully use FlowRow and alignment? Seems like it's not possible to vertically center items in a flow row due to FlowRowScopeInstance being private.
c
r
f
  • 3
  • 18
  • 1120
I can’t pass a drawable id (R.drawable.image) as an INT for my painterResource(). When running in re...
a

Aaron Waller

about 3 years ago
I can’t pass a drawable id (R.drawable.image) as an INT for my painterResource(). When running in release mode I get the following crash:
java.lang.IllegalArgumentException: Only VectorDrawables and rasterized asset types are supported ex. PNG, JPG
the image I pass as an INT is a PNG.
a
a
+2
  • 4
  • 7
  • 1120
One of the biggest downsides of Compose for me is the performance. Eventhough I have R8 enabled and ...
a

Aaron Waller

about 3 years ago
One of the biggest downsides of Compose for me is the performance. Eventhough I have R8 enabled and I’m running in release build (which is also a downside cause it takes hours to build and heats up my laptop) it is still a poor experience. HorizontalPager + LazyVerticalGrid with 3 columns = 10 FPS Same setup on XML = extremely fast.
➕ 2
a
z
+5
  • 7
  • 38
  • 1119
what can I do if the `compileKotlin` Gradle task always hangs for 10+ minutes, and launches a Java p...
a

Adam S

over 2 years ago
what can I do if the
compileKotlin
Gradle task always hangs for 10+ minutes, and launches a Java process that takes up 100% CPU? This is for a small v1.8.10 project with ~10 Kotlin classes (Gradle 8.0.2) I’ve tried cleaning, rebooting, running with
--no-build-cache
,
--no-configuration-cache
,
kotlin.incremental=false
, `kotlin.caching.enabled=false`…
a
t
h
  • 3
  • 19
  • 1119
is it possible to have a button that is pinned to the bottom of the screen (either via box alignment...
a

abbic

over 2 years ago
is it possible to have a button that is pinned to the bottom of the screen (either via box alignment or Column arrangement) when the content is not scrollable, but switch to scrolling along witht he rest of the content when there is enough content to scroll?
a
c
s
  • 3
  • 7
  • 1118
Previous363738Next

kotlinlang

A modern programming language that makes developers happier.

Powered by