Skip to content

Instantly share code, notes, and snippets.

View RxCallInstruction.kt
class RxCallInstruction : Instruction() {
override fun getDescription(): String {
return "Should wait until login completes."
}
override fun checkCondition(): Boolean {
return RxCounter.isIdle()
}
}
@Peddro
Peddro / SpannableStringColor.java
Last active May 20, 2016
Change color of words in the middle of a text.
View SpannableStringColor.java
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
public class SpannableStringColor {
private final String text;
private final Spannable colorizedString;
public SpannableStringColor(String text) {
@Peddro
Peddro / ScreengrabHelper.java
Last active Feb 23, 2016
Helper for screengrab to take delayed screenshots
View ScreengrabHelper.java
public class ScreengrabHelper {
private static ScreengrabHelper instance;
private static final long INIT_DELAY = 2000;
private long delay;
private boolean screenShotTaken;
public ScreengrabHelper() {
this.delay = INIT_DELAY;