Skip to content

Instantly share code, notes, and snippets.

View tprochazka's full-sized avatar

Tomáš Procházka tprochazka

View GitHub Profile
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite failures="1" time="2.671" errors="0" skipped="0" tests="104" name="com.integralblue.httpresponsecache.compat.libcore.net.http.HttpResponseCacheTest">
<properties>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="sun.boot.library.path" value="c:\Program Files (x86)\Java\jdk1.7.0\jre\bin"/>
<property name="java.vm.version" value="21.0-b17"/>
<property name="user.country.format" value="CZ"/>
<property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="java.vendor.url" value="http://java.oracle.com/"/>
<property name="path.separator" value=";"/>
@tprochazka
tprochazka / WidthEvaluator.java
Created May 10, 2012 19:45
How to animate width of any View
import android.animation.IntEvaluator;
import android.view.View;
import android.view.ViewGroup;
public final class WidthEvaluator extends IntEvaluator {
private final View view;
public WidthEvaluator(View dashboard) {
this.view = dashboard;
/**
* Global one way asynchronous notification mechanism between parts of application based on Handler class.
* For example from service to activities.
*
* <p>
* Notification are always delivered to the UI thread.
* </p>
*
* <p>
* This class keep all listeners as weak reference so it is save to add whole activities as listeners, but do not use
@tprochazka
tprochazka / ContractFragment.java
Created May 7, 2012 04:17 — forked from JakeWharton/ContractFragment.java
Base fragment to ensure the parent activity implements a contract interface.
/* Base fragment to ensure the parent activity implements a contract interface. */
public abstract class ContractFragment<T> extends Fragment {
private T mContract;
@Override
public void onAttach(Activity activity) {
try {
mContract = (T)activity;
} catch (ClassCastException e) {
throw new IllegalStateException(activity.getClass().getSimpleName()