https://kotlinlang.org
Join Slack
I'm trying to use `LazyColumn` inside a `NestedScrollView`, it works... But the list does not scroll...
j

Jhonatan Sabadi

about 3 years ago
I'm trying to use
LazyColumn
inside a
NestedScrollView
, it works... But the list does not scroll. Is there a way to make it work?
j
k
+2
  • 4
  • 9
  • 835
Hello all, did anyone use Protobuf for KMM project? Basically, my generated Protobuf files are in `b...
m

Mario Loncar

over 2 years ago
Hello all, did anyone use Protobuf for KMM project? Basically, my generated Protobuf files are in
build
folder, I generated both Kotlin and mandatory Java file. The problem is: I see generated files in
androidMain
but I cannot see generated Kotlin models in
commonMain
(which makes sense since they rely on Java file), and when I add files to sourceSets, Kotlin Proto files gets corrupted and are unable to resolve mandatory proto Java file. Did anyone encounter this and how did you solve it?
m
j
+2
  • 4
  • 6
  • 834
Any idea how to retrieve the version defined in build.gradle.kts so that i can use it in my code ?
l

Laurent Laborde

almost 3 years ago
Any idea how to retrieve the version defined in build.gradle.kts so that i can use it in my code ?
l
h
y
  • 3
  • 8
  • 833
What happened to debugging variables in the IDE? Everywhere in my code I have these useless errors o...
a

Adam Pelsoczi

about 3 years ago
What happened to debugging variables in the IDE? Everywhere in my code I have these useless errors on variables:
'uuid' was optimised out
'registrationID' was optimised out
'rtcId' was optimised out
'bytes' was optimised out
and also:
This variable is inaccessible because it isn't used after the last suspension point
a
u
  • 2
  • 3
  • 833
What is the best way to add a scroll bar to a LazyColumn in Jetpack Compose?
s

spierce7

over 1 year ago
What is the best way to add a scroll bar to a LazyColumn in Jetpack Compose?
s
a
+2
  • 4
  • 5
  • 832
how can I get the view of the current composable only ? I tried LocalView.current but it gets the wh...
l

Louis

almost 2 years ago
how can I get the view of the current composable only ? I tried LocalView.current but it gets the whole screen.
l
a
+5
  • 7
  • 22
  • 832
What is the advantage of using `either` over `either.eager` for suspending computations? If I use `e...
l

Lukasz Kalnik

almost 3 years ago
What is the advantage of using
either
over
either.eager
for suspending computations? If I use
either.eager
, will it simply block the current thread?
suspend fun doSomethingLong(): Either<Error, Unit>

either.eager {
    doSomethingLong() // does it block the current thread?
}
l
s
s
  • 3
  • 21
  • 831
Can anyone explain how to store image from our gallery to room database?
k

Ketan Khunti

almost 4 years ago
Can anyone explain how to store image from our gallery to room database?
👀 1
😶 3
google 1
🚫 1
k
u
j
  • 3
  • 17
  • 831
I’ve a problem when running a KMM project on IOS simulator, always gives me the following error: ```...
a

AmrJyniat

over 2 years ago
I’ve a problem when running a KMM project on IOS simulator, always gives me the following error:
** BUILD FAILED **
The following build commands failed:
	PhaseScriptExecution Run\ Script /Users/ultimate/KMMProjects/OrdersDelivery/build/ios/iosApp.build/Debug-iphonesimulator/iosApp.build/Script-7555FFB5242A651A00829871.sh (in target 'iosApp' from project 'iosApp')
(1 failure)
I think it’s a trivial issue, anyone knows what’s the cause of this problem?
a
p
  • 2
  • 18
  • 828
How can I collect, observe changes from savedStateHandle in a viewModel? I have Screen A and ScreenA...
b

bryankeltonadams

over 1 year ago
How can I collect, observe changes from savedStateHandle in a viewModel? I have Screen A and ScreenAViewModel, I navigate to screen B, then press a button which takes the navController.previousBackStackEntry and updates a key value, the Compose savedStateHandle from the backStackEntry gets updated, but the savedStateHandle in the viewModel does not. I tried using the StateFlow on the savedStateHandle and the update never triggers a collection, I tested changing the key in the viewModels savedStateHandle and that does work, but the problem is that I'm trying to change it from the other screen which is outside of the scope of ScreenAViewModel. Any ideas? I'm basically trying to pass an argument back from Screen B, which is an id, and then trigger a network call to get some data. (think going from a form, to an item or location picker). Should I just get it from the backStackEntry in the composable, and then trigger a LaunchedEffect when it changes instead of trying to observe changes in the viewModel?
b
i
  • 2
  • 6
  • 823
Previous535455Next

kotlinlang

A modern programming language that makes developers happier.

Powered by