Skip to content

Instantly share code, notes, and snippets.

View saiaspire's full-sized avatar

Saikrishnan Ranganathan saiaspire

View GitHub Profile
@saiaspire
saiaspire / RadioGridGroup.java
Last active March 24, 2024 10:33
A Radio Group that has GridLayout as its parent. This allows for more complex layouts of RadioButton (use AppCompatRadioButton). For example, when you need multiple rows of Radio Buttons.
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.AppCompatRadioButton;
import android.support.v7.widget.GridLayout;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.CompoundButton;
@saiaspire
saiaspire / PersistentHttpCookieStore
Last active August 29, 2015 14:07
A persistent Cookie Store for Android which implements the java.net.CookieStore interface and can be used with frameworks like Retrofit & Volley. Cookies are stored and will persist on the user's device between application sessions since they are serialized and stored in SharedPreferences.
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import android.util.Log;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;