(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.
| package com.vishal2376.animations | |
| import androidx.compose.animation.Crossfade | |
| import androidx.compose.animation.core.animateFloatAsState | |
| import androidx.compose.animation.core.tween | |
| import androidx.compose.foundation.ExperimentalFoundationApi | |
| import androidx.compose.foundation.Image | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.layout.Arrangement | |
| import androidx.compose.foundation.layout.Box |
| @Composable | |
| fun InteractiveCanvas(maxWidth: Int, maxHeight: Int) { | |
| val random = remember { Random.Default } | |
| var touchPosition by remember { mutableStateOf(Offset.Unspecified) } | |
| val heartSize = 75F | |
| val heartPath = createHeartPath(heartSize) | |
| val heartOffsets = remember { mutableStateListOf<Offset>() } | |
| val heartColors = remember { mutableStateListOf<Color>() } | |
| if (heartOffsets.isEmpty()) { |
| package com.aracem.utils.animations.pagetransformation; | |
| import org.jetbrains.annotations.NotNull; | |
| import android.support.v4.view.ViewPager; | |
| import android.view.View; | |
| import java.util.ArrayList; | |
| import java.util.List; |
(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.