Skip to content

Instantly share code, notes, and snippets.

package com.myapp;
import android.app.Application;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
public class MyApplication extends Application {
private static RequestQueue requestQueue;
private static MyApplication appInstance = null;
@bolhoso
bolhoso / gist:8403087
Last active October 7, 2017 05:09
An Android Espresso IdlingResource to monitor Volley requests (bot not working yet..)
public final class VolleyIdlingResource implements IdlingResource {
private static final String TAG = "VolleyIdlingResource";
private final String resourceName;
// written from main thread, read from any thread.
private volatile ResourceCallback resourceCallback;
private Field mCurrentRequests;
private RequestQueue mVolleyRequestQueue;
@bolhoso
bolhoso / gist:8008744
Created December 17, 2013 17:17
Um TExtView custom que intercepta eventos de paste
package com.example.interceptedittext;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.EditText;
/**
* A TextView that supports true type fonts directly as a property in the XML.
*
* @see CachedTrueTypeDelegate check for more details adding fonts