Skip to content

Instantly share code, notes, and snippets.

Bill Best wmbest2

Block or report user

Report or block wmbest2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am wmbest2 on github.
  • I am wmbest2 (https://keybase.io/wmbest2) on keybase.
  • I have a public key ASC4OJiOEDEqF34Y2pK4S39PjpbjlA7SCUAaQEzFXmqYego

To claim this, I am signing this object:

View rxandroidinput.md

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

@wmbest2
wmbest2 / backup_appdata
Created Oct 25, 2013
shell script for app backup
View backup_appdata
#!/bin/bash
adb backup -f /tmp/data.ab -noapk $1
dd if=/tmp/data.ab bs=1 skip=24 | /usr/local/Cellar/openssl/1.0.1e/bin/openssl zlib -d | tar -xvf -
rm /tmp/data.ab
@wmbest2
wmbest2 / example.html
Last active Dec 17, 2015
ctrl-click directive
View example.html
<span ctrl-click="someFuncInMyController()">Hello World</span>
@wmbest2
wmbest2 / test-runner
Created Mar 23, 2012
Python script to generate test commands
View test-runner
#! /usr/bin/python
import curses
import sys
import os
runners = ["android.test.InstrumenationTestRunner"
, "pl.polidea.instrumentation.PolideaInstrumentationTestRunner"]
create = ["Add class", "Run Tests"]
@wmbest2
wmbest2 / change.sh
Created Feb 9, 2012
Command line to bulk change a Package Name
View change.sh
find . -name "*.java" | xargs perl -pi -e "s/com.vokal.XXX/com.vokal.YYY/g"
@wmbest2
wmbest2 / adb_install.sh
Created Aug 17, 2011 — forked from scottferg/adb_install.sh
Small shell script to easily deploy an Android debug build to all connected devices using adb
View adb_install.sh
#!/bin/bash
file="bin/*-debug.apk"
uninstall=0
while getopts "ruf:" opt; do
case $opt in
r)
file="bin/*-release.apk"
;;
u)
uninstall=1
View CustomerListTest.java
package com.vokal.petcheck.test;
import android.app.Activity;
import android.app.Instrumentation;
import android.content.Intent;
import android.content.IntentFilter;
import android.test.ActivityInstrumentationTestCase2;
import android.test.TouchUtils;
import android.util.Log;
import android.view.KeyEvent;
@wmbest2
wmbest2 / LoginActivity.java
Created Mar 17, 2011
LoginActivity with persistant AsyncTasks
View LoginActivity.java
package com.vokal.petcheck;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wmbest.countdown"
android:versionCode="1"
android:versionName="1.0">
<application android:label="TEST WIDGET" android:icon="@drawable/icon">
<receiver android:name="CountdownWidget"
android:label="Jill's Widget">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
You can’t perform that action at this time.