Skip to content

Instantly share code, notes, and snippets.

@wmbest2
wmbest2 / adb_install.sh
Created August 17, 2011 19:28 — forked from scottferg/adb_install.sh
Small shell script to easily deploy an Android debug build to all connected devices using adb
#!/bin/bash
file="bin/*-debug.apk"
uninstall=0
while getopts "ruf:" opt; do
case $opt in
r)
file="bin/*-release.apk"
;;
u)
uninstall=1

Reactive Forms with RxAndroid and TextInputLayout

Reactive Programming has been getting a lot of attention in the Android community lately. While it has uses throughout the application stack, we're going to focus here on using it to validate forms (exciting!). This approach cuts down on ugly nested if statements and transforms all of the validation logic to just a few simple lines using the RxJava framework. More, its robust and testable.

This post assumes some knowledge of how RxJava and lambdas work. If you need more of a refresher RxJava Retrolambda

Setup layout with TextInputLayout

import urllib
import urllib2
import re
from urllib2 import URLError, HTTPError
error = None
wave = None
auth = None