The code below renders the following text in both Android Views and in Jetpack Compose UI.
Contact our team on 555 555 555 Opt 3 to activate.
The code below renders the following text in both Android Views and in Jetpack Compose UI.
Contact our team on 555 555 555 Opt 3 to activate.
import androidx.compose.animation.* | |
import androidx.compose.animation.core.tween | |
import androidx.compose.material.* | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.onCommit | |
import androidx.compose.ui.Modifier | |
@OptIn(ExperimentalAnimationApi::class, ExperimentalMaterialApi::class) | |
@Composable | |
fun <T> AnimatedSwipeDismiss( |
This gist demonstrates how to build a Kotlin MPP library so that the iOS sourceSet
depends on and uses an iOS Framework as a dependency.
Key ideas:
./gradlew publishToMavenLocal
arm64
and x86_64
architectures, you can easily add arm32
if you need.cinterop
klib
artifact, allowing dependents to also know about the iOS Framework headers.You can find a gist explaining how to use such library in an iOS app [here][ios-app].
public class Pager<I, O> { | |
private static final Observable FINISH_SEQUENCE = Observable.never(); | |
private PublishSubject<Observable<I>> pages; | |
private Observable<I> nextPage = finish(); | |
private Subscription subscription = Subscriptions.empty(); | |
private final PagingFunction<I> pagingFunction; | |
private final Func1<I, O> pageTransformer; |
#!/bin/bash | |
# Sync Homebrew installations between Macs via Dropbox | |
# | |
BREW="/usr/local/bin/brew" | |
# first get local settings | |
echo "Reading local settings ..." | |
rm -f /tmp/brew-sync.* |
import android.animation.ValueAnimator; | |
import android.graphics.ColorMatrix; | |
import android.graphics.ColorMatrixColorFilter; | |
import android.view.animation.AccelerateDecelerateInterpolator; | |
import android.view.animation.Interpolator; | |
import android.widget.ImageView; | |
import java.lang.ref.SoftReference; | |
public class PhotographicPrintAnimator { |
(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.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
using Android.App; | |
using Android.Text; | |
using Android.Text.Style; | |
using Android.Widget; | |
using Android.OS; | |
namespace MonoDroid.TextViewWithImages | |
{ | |
[Activity(Label = "Text with Images", MainLauncher = true, Icon = "@drawable/icon")] | |
public class Activity1 : Activity |