Skip to content

Instantly share code, notes, and snippets.

View ghatasheh's full-sized avatar

Hisham Ghatasheh ghatasheh

  • Dubai, UAE
View GitHub Profile
@ghatasheh
ghatasheh / ECallback.java
Created May 31, 2015 12:04
Retrofit cancellable callback
import retrofit.Callback;
import retrofit.RetrofitError;
import retrofit.client.Response;
public class ECallback<T> implements Callback<T> {
private Callback<T> callback;
private boolean canceled;
@ghatasheh
ghatasheh / Prefs.java
Created May 31, 2015 12:02
Android SharedPreferences helper
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import com.google.gson.Gson;
import java.util.Map;
import java.util.Set;
public class Prefs {
@ghatasheh
ghatasheh / ExpandCollapseAnimationHelper.java
Last active January 17, 2018 02:36
Expand-Collapse animation
public class ExpandCollapseAnimationHelper {
private final static int DURATION = 300;
ValueAnimator valueAnimator;
ViewGroup contentLayout;
public ExpandCollapseAnimationHelper(ViewGroup contentLayout) {
this.contentLayout = contentLayout;