https://kotlinlang.org
Join Slack
I know that val cannot be reassigned, but how would I for example send a variable to a function to d...
o

oday

over 4 years ago
I know that val cannot be reassigned, but how would I for example send a variable to a function to do something with it?
private fun resetCounterAndGame(counter: Int) {
    if (counter == 2) {
        gameButtonText.set(resProvider.getString(R.string.try_another_number))
        gameStarted = false
        counter = 0 <--- val cannot be reassigned of course
    }
}
o
w
+4
  • 6
  • 19
  • 2339
What is the alternative to intrinsics. I am getting an error with using it with a complex view whic...
d

David Corrado

over 2 years ago
What is the alternative to intrinsics. I am getting an error with using it with a complex view which does not support intrinsics
d
k
z
  • 3
  • 13
  • 2334
Compose + ViewModel + MutableState combination is error-prone due to snapshots mechanics. Shouldn't ...
g

George

almost 3 years ago
Compose + ViewModel + MutableState combination is error-prone due to snapshots mechanics. Shouldn't something be done about it? (details inside)
g
d
+3
  • 5
  • 28
  • 2329
How to set drawable left in android compose Text ?
c

Chethan

over 4 years ago
How to set drawable left in android compose Text ?
c
r
a
  • 3
  • 6
  • 2323
Is there a better way to delay the `AnimatedVisibility` execution? Code in thread.
v

Vsevolod Kaganovych

over 3 years ago
Is there a better way to delay the
AnimatedVisibility
execution? Code in thread.
v
c
d
  • 3
  • 9
  • 2311
Hello, I am getting this error on my newly created KMM project when i try to run the IOS app from an...
s

Solomon Tolu Samuel

over 3 years ago
Hello, I am getting this error on my newly created KMM project when i try to run the IOS app from android studio
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':shared'.
> The project must have a target for at least one of the following platforms: ios_simulator_arm64.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at <https://help.gradle.org>

BUILD FAILED in 415ms
** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution [CP-User]\ Build\ shared /Users/tolusolomon/AndroidStudioProjects/MyApplication/build/ios/Pods.build/Debug-iphonesimulator/shared.build/Script-4552119A071AC6BAB7327E6434237EC3.sh (in target 'shared' from project 'Pods')
(1 failure)
Command PhaseScriptExecution failed with a nonzero exit code
And a build time error when i try to run the iosApp on Xcode:
"cannot find 'Greeting 'in scope"
and also this error
Failed to register bundle identifier (The app identifier "orgIdentifier.iosApp" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.)
please help out, thanks
s
p
  • 2
  • 4
  • 2310
How do I use `Modifier.imePadding()` with `Scaffold`? (Material3) If I use both the scaffold padding...
d

Daniele Segato

over 2 years ago
How do I use
Modifier.imePadding()
with
Scaffold
? (Material3) If I use both the scaffold padding (
PaddingValues
) and
.imePadding()
in my screen the padding on the bottom is greater than it should be. If I do not use the scaffold bottom padding and only use
.imePadding()
the padding is correct when the ime is open but it is too little when it is close. What's the proper way to use these APIs? (btw why is
WindowsInsets
not named
LocalWindowsInsets
like other "Locals"?)
d
v
+3
  • 5
  • 13
  • 2285
How I can pass the click event from child composable to its parent? e.g: ```Card( Modifier.clickab...
a

AmrJyniat

almost 3 years ago
How I can pass the click event from child composable to its parent? e.g:
Card(
  Modifier.clickable { doSomething() }
){
   CheckBox(
     .....,
     onCheckedChange = {  } // leave it empty and pass its event to parent
   )
   Text("Some label")
}
a
m
+3
  • 5
  • 11
  • 2280
Hey, how am i supposed to do a scroll in a compose test where the view is a column with a scroll mod...
l

Louis

about 4 years ago
Hey, how am i supposed to do a scroll in a compose test where the view is a column with a scroll modifier ? I tried this but this didnt worked
testRule.onNode(hasScrollToKeyAction()).performScrollToIndex(index)
l
a
j
  • 3
  • 3
  • 2270
We have released a new chart library fully built-in Compose and Kotlin. You can check it out in our ...
d

Deepak k.k

over 2 years ago
We have released a new chart library fully built-in Compose and Kotlin. You can check it out in our GitHub repo. Some of its features: • Line Charts • Bar Charts • Grouped Bar Charts • Pie Charts • Donut Charts • Combined Charts Charts are fully customizable with a Compose taste. Additionally, YCharts has also accessibility support. Feel free to check out YCharts here, and provide us with any feedback you may have
💯 6
🔥 8
📊 3
👌🏻 1
👀 3
👍 2
❤️ 3
🍩 2
👌🏽 2
🙌 2
📈 2
👌 1
✅ 1
👌 11
😮 1
d
k
+5
  • 7
  • 23
  • 2266
Previous678Next

kotlinlang

A modern programming language that makes developers happier.

Powered by