Instead of the verbose setOnClickListener
:
RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));
Observable
.just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
import android.graphics.Typeface | |
import androidx.annotation.CheckResult | |
import java.lang.Exception | |
/** @author Aidan Follestad (@afollestad) */ | |
object TypefaceHelper { | |
private val cache = hashMapOf<String, Typeface>() | |
/** | |
* Gets a typeface by its family name. Automatically statically caches it to avoid |
class CommandLineParser( | |
private val input: String | |
) : Iterator<String> { | |
private var lastIndex: Int = 0 | |
override fun hasNext(): Boolean = lastIndex in 0..input.length - 2 | |
override fun next(): String { | |
val value = StringBuilder() | |
var quoteStarter: Char? = null |
@file:Suppress("unused", "MemberVisibilityCanBePrivate") | |
package com.afollestad.flow.util | |
import com.google.common.truth.Truth.assertThat | |
import com.google.common.truth.Truth.assertWithMessage | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Dispatchers.Unconfined | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.Job |
public class ResizeAnimation extends Animation { | |
final int startWidth; | |
final int targetWidth; | |
View view; | |
public ResizeAnimation(View view, int targetWidth) { | |
this.view = view; | |
this.targetWidth = targetWidth; | |
startWidth = view.getWidth(); | |
} |
const { widget } = figma | |
const { Rectangle, AutoLayout, Frame, Text, useSyncedState, usePropertyMenu, useEffect, Ellipse } = widget | |
function Dot(props) { | |
let visible = props.visible | |
return ( | |
<Ellipse | |
opacity={visible ? 1 : 0} | |
width={24} | |
height={24} |
// | |
// Clubhouse.swift | |
// Playground | |
// | |
// Created by Nav Singh on 2/11/21. | |
// | |
import SwiftUI | |
struct Clubhouse: View { |
SDK=`adb shell getprop ro.build.version.sdk | tr -d '\r'` | |
echo "Device SDK level is: " $SDK | |
if (( "$SDK" >= 23 )) ; then | |
echo "Enabling read and write external storage permissions before running tests on Android 6.0+" | |
adb shell pm grant com.replace.with.your.app.package android.permission.WRITE_EXTERNAL_STORAGE | |
adb shell pm grant com.replace.with.your.app.package android.permission.READ_EXTERNAL_STORAGE | |
fi |
import java.io.*; | |
public class TestProcessIO { | |
public static boolean isAlive(Process p) { | |
try { | |
p.exitValue(); | |
return false; | |
} | |
catch (IllegalThreadStateException e) { |
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |