(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // swift-tools-version:4.0 | |
| import PackageDescription | |
| #if os(Linux) | |
| import Glibc | |
| #else | |
| import Darwin.C | |
| #endif | |
| enum Enviroment: String { |
| /* | |
| * Copyright 2020 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| import androidx.compose.foundation.Image | |
| import androidx.compose.foundation.layout.Row | |
| import androidx.compose.foundation.layout.padding | |
| import androidx.compose.foundation.layout.preferredSize | |
| import androidx.compose.material.MaterialTheme | |
| 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.ColorFilter |
| import android.annotation.SuppressLint | |
| import androidx.compose.animation.core.animateDpAsState | |
| import androidx.compose.animation.core.animateFloatAsState | |
| import androidx.compose.foundation.Canvas | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.gestures.awaitFirstDown | |
| import androidx.compose.foundation.gestures.forEachGesture | |
| import androidx.compose.foundation.gestures.horizontalDrag | |
| import androidx.compose.foundation.layout.Arrangement.spacedBy | |
| import androidx.compose.foundation.layout.Box |
| /** | |
| * Kotlin Multiplatform Universal XCFramework Task | |
| * | |
| * Description: | |
| * If your project needs to target *all* possible | |
| * iOS and macOS variants (including Apple Silicon | |
| * hardware, ARM64 iPhone simulators, and so on), | |
| * this task will build the frameworks, lipo those | |
| * that can be combined into a single binary, and | |
| * place them where Xcode expects to find them in |
| package com.yourpackage | |
| import android.os.Bundle | |
| import android.view.View | |
| import androidx.compose.runtime.MonotonicFrameClock | |
| import androidx.compose.runtime.PausableMonotonicFrameClock | |
| import androidx.compose.runtime.Recomposer | |
| import androidx.compose.ui.InternalComposeUiApi | |
| import androidx.compose.ui.platform.AbstractComposeView | |
| import androidx.compose.ui.platform.AndroidUiDispatcher |
| package des.c5inco.cardswipecompose | |
| import androidx.compose.animation.core.Animatable | |
| import androidx.compose.animation.core.CubicBezierEasing | |
| import androidx.compose.animation.core.LinearOutSlowInEasing | |
| import androidx.compose.animation.core.animateDpAsState | |
| import androidx.compose.animation.core.animateFloatAsState | |
| import androidx.compose.animation.core.calculateTargetValue | |
| import androidx.compose.animation.core.keyframes | |
| import androidx.compose.animation.splineBasedDecay |
| import androidx.test.runner.AndroidJUnitRunner | |
| class CustomJunitRunner : AndroidJUnitRunner() { | |
| private var enabledImes = emptyList<String>() | |
| override fun callApplicationOnCreate(app: Application?) { | |
| super.callApplicationOnCreate(app) | |
| enabledImes = getEnabledImes() | |
| disableSoftKeyboards(enabledImes) |