All thanks to a tweet by Chris Albon
- Cut Copy (via Andrew Musselman)
- Com Truise (via Sean J. Taylor)
- Makkam (via Karissa McKelvey)
- Slow Magic (via Clare Corthell)
| import android.animation.ObjectAnimator; | |
| import android.graphics.Rect; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.view.ViewTreeObserver; | |
| /** | |
| * An OnGlobalLayoutListener interface that will adjust and resize a fullscreen scene's view when the soft keyboard is shown | |
| * or hidden. | |
| * |
All thanks to a tweet by Chris Albon
| import org.junit.rules.TestRule; | |
| import org.junit.runner.Description; | |
| import org.junit.runners.model.Statement; | |
| /** Got flaky tests? Shampoo them away. */ | |
| public final class ShampooRule implements TestRule { | |
| private final int iterations; | |
| public ShampooRule(int iterations) { | |
| if (iterations < 1) throw new IllegalArgumentException("iterations < 1: " + iterations); |
| Handler handler = new Handler(Looper.getMainLooper()); | |
| final DisplayManager displayManager = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE); | |
| displayManager.registerDisplayListener(new DisplayManager.DisplayListener() { | |
| @Override | |
| public void onDisplayAdded(int displayId) { | |
| } | |
| @Override |
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="de.mobilej.overlay" | |
| android:versionCode="1" | |
| android:versionName="1.0" > | |
| <uses-sdk android:minSdkVersion="14" /> | |
| <application android:label="SystemOverlay" > | |
| <activity |
| #!/usr/bin/env bash | |
| rm -rf "${HOME}/Library/Caches/CocoaPods" | |
| rm -rf "`pwd`/Pods/" | |
| pod update |