Example from Android Jetpack: LiveData
MutableLiveData Example |
---|
![]() |
package com.company; | |
import javax.crypto.Cipher; | |
import javax.crypto.Mac; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.security.MessageDigest; | |
import java.security.SecureRandom; | |
public class Main { |
import io.realm.* | |
import io.realm.kotlin.where | |
import kotlinx.coroutines.GlobalScope | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.suspendCancellableCoroutine | |
import kotlin.coroutines.resume | |
import kotlin.coroutines.resumeWithException | |
private suspend fun <T: RealmObject, S: RealmQuery<T>> findAllAwait(query: S): RealmResults<T> = suspendCancellableCoroutine { continuation -> | |
val listener = RealmChangeListener<RealmResults<T>> { t -> continuation.resume(t) } |
MutableLiveData Example |
---|
![]() |
Electron is tricky to get set up on Windows Subsystem for Linux, but it can work!
Four things needed overall:
apt install
several dependenciesSetup instructions, in order:
package components | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.material.Text | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Alignment | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.graphics.Color |