https://kotlinlang.org
Join Slack
Is it possible to somehow access the iOS Keychain in Kotlin unit tests?
w

Waldemar Kornewald

almost 2 years ago
Is it possible to somehow access the iOS Keychain in Kotlin unit tests?
w
j
r
  • 3
  • 5
  • 437
Why can't a public `inline` function call a private `inline` function? I get why we can't call non-...
j

Joffrey

over 2 years ago
Why can't a public
inline
function call a private
inline
function? I get why we can't call non-inline private functions (because when we inline the public function, all its body must be accessible at the call site), but that doesn't apply to other inline functions, so long as the whole inline chain ends up calling only public stuff, right? So why is this forbidden?
inline fun doStuffInline() {
    myPrivateInline() // ERROR: Public-API inline function cannot access non-public-API 'private inline fun myPrivateInline(): Unit defined in root package in file File.kt'
}

private inline fun myPrivateInline() {
    println("Anyone can call this print statement")
}
https://pl.kotl.in/7bPhHMUJ-
j
i
  • 2
  • 3
  • 437
Hello ! I’m trying to use `AnimatedContent` to animate my content between each type of state. ```@Co...
i

Ilan Sasportas

over 2 years ago
Hello ! I’m trying to use
AnimatedContent
to animate my content between each type of state.
@Composable
fun MyComposable(content: MyState, modifier: Modifier) {
    AnimatedContent(
        targetState = content,
        transitionSpec = { fadeIn(animationSpec = tween(500)) with fadeOut(animationSpec = tween(500)) }
    ) { targetState, contentModifier ->
        when (targetState) {
            is MyState.Loading -> LoadingContent(contentModifier)

            is MyState.Success -> SuccessContent(
                model = targetState.successModel,
                modifier = contentModifier
            )

            is MyState.Error -> ErrorContent(
                model = targetState.errorModel,
                modifier = contentModifier
            )
        }
    }
}
Unfortunately the animation is triggered at each state change, even between 2 Success for instance, which I don’t want. Any idea how can I trigger animation only between Loading / Success / Error types ?
i
t
+3
  • 5
  • 11
  • 437
How can I force an update on the window? This is what I'm trying to do: Press a specific letter or n...
d

dkim

almost 4 years ago
How can I force an update on the window? This is what I'm trying to do: Press a specific letter or number and parts of the window changes (ex color) (When you press the letter/number it changes a variable) But it only updates when the application starts/window opens
d
a
+2
  • 4
  • 10
  • 437
Hi. I'm using Android Studio Chipmunk. I can't call `viewModel()`in a `@Composable`parameter, though...
l

loloof64

over 3 years ago
Hi. I'm using Android Studio Chipmunk. I can't call `viewModel()`in a `@Composable`parameter, though I've added the dependency
androidx.lifecycle:lifecycle-viewmodel-compose:2.5.0
to build.gradle file of the app module. Why ? (I keep getting the error "Expression 'viewModel' of type 'StockfishLibraryViewModel' cannot be invoked as a function. The function 'invoke()' is not found")
l
i
  • 2
  • 11
  • 436
Does anyone know how to fix `The feature "multi platform projects" is experimental and should be ena...
j

Jawid

over 4 years ago
Does anyone know how to fix
The feature "multi platform projects" is experimental and should be enabled explicitly
warning in IntelliJ IDEA (Android Studio)? Thanks
j
t
  • 2
  • 4
  • 436
Hi. How can I generate a unique sessionID? I want users to login via username and password and then ...
t

teremy

almost 5 years ago
Hi. How can I generate a unique sessionID? I want users to login via username and password and then generate a sessionID that is saved in database and in a cookie.
t
y
+2
  • 4
  • 6
  • 436
How do I clear kotlinc scripts cache?
b

Big Chungus

over 4 years ago
How do I clear kotlinc scripts cache?
b
m
+2
  • 4
  • 12
  • 435
When using kotlinx serialization and passing strings in KMP type safe destination via the NavHost, I...
h

Hristijan

about 1 year ago
When using kotlinx serialization and passing strings in KMP type safe destination via the NavHost, I've noticed that the String limit characters is bigger on the JVM than on iOS, it crashes on iOS without a specific error other than cryptic one
👀 1
h
s
f
  • 3
  • 22
  • 434
Hi I have encountered an issue when upgrading to 1.8.20, the gradle build failed due to an error li...
h

hantsy

over 2 years ago
Hi I have encountered an issue when upgrading to 1.8.20, the gradle build failed due to an error like this.
> Could not find org.jetbrains.kotlin:kotlin-scripting-jvm:1.8.20.
     Searched in the following locations:
       - file:/C:/Users/hantsy/.android/manual-offline-m2/gmaven_stable/org/jetbrains/kotlin/kotlin-scripting-jvm/1.8.20/kotlin-scripting-jvm-1.8.20.pom
       - <https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-scripting-jvm/1.8.20/kotlin-scripting-jvm-1.8.20.pom>
     Required by:
         project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.8.20 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.8.20
h
e
+4
  • 6
  • 16
  • 434
Previous154155156Next

kotlinlang

A modern programming language that makes developers happier.

Powered by