Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Christopher Jenkins chrisjenx

🏠
Working from home
View GitHub Profile
View gradient.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chrisjenx
chrisjenx / BlurTransform.java
Last active Aug 29, 2015 — forked from ryanbateman/gist:6667995
BlurTransformer for Picasso using renderscript lib.
View BlurTransform.java
package com.loveflutter.ui.support;
import android.content.Context;
import android.graphics.Bitmap;
import android.support.annotation.NonNull;
import android.support.v8.renderscript.Allocation;
import android.support.v8.renderscript.Element;
import android.support.v8.renderscript.RenderScript;
import android.support.v8.renderscript.ScriptIntrinsicBlur;
@chrisjenx
chrisjenx / SimpleArrayMapJsonSerializer.java
Created Dec 21, 2014
SimpleArrayMap Json/Gson Serializer
View SimpleArrayMapJsonSerializer.java
import android.support.v4.util.SimpleArrayMap;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
@chrisjenx
chrisjenx / ExampleTwoEditTexts.xml
Created Aug 8, 2014
Unfinished FormGroup to support ImageViews outside of EditTexts. Will set states on the ImageViews based on the focus state of the EditTexts.
View ExampleTwoEditTexts.xml
<com.justyoyo.ui.views.forms.FormGroupView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/space_small"
android:paddingRight="@dimen/space_small">
<TextView
style="@style/TextViewV3.AssetEditText"
android:text="S"/>
@chrisjenx
chrisjenx / ContentLoadingFrameLayoyt..java
Created May 21, 2014
Similar to the LoadingProgressSpinner which doesnt flicker if you change stages quickly.
View ContentLoadingFrameLayoyt..java
public abstract class ContentLoadingFrameLayout extends FrameLayout {
private static final int MIN_SHOW_TIME = 200; // ms
private static final int MIN_DELAY = 200; // ms
private ProgressBar mProgressBar;
private View mContent;
private long mStartTime = -1;
private boolean mPostedHide = false;
private boolean mPostedShow = false;
@chrisjenx
chrisjenx / GsonBuilder.java
Last active Oct 19, 2015
Custom Gson Serialiser for android.support.v4.util.SimpleArrayMap;
View GsonBuilder.java
return new GsonBuilder()
.registerTypeAdapter(SimpleArrayMapJsonSerializer.TYPE, new SimpleArrayMapJsonSerializer())
.create();
@chrisjenx
chrisjenx / gist:7428816
Last active Dec 28, 2015 — forked from anonymous/gist:7428588
Added style and cleaned up
View gist:7428816
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
a { color: #FFFFFF; }
iframe[id^='twitter-widget-']{ width:100%;}
em {visibility: hidden;}
</style>
<script>
@chrisjenx
chrisjenx / .gitignore
Created Aug 2, 2013
Java / Gradle / IDEA / Eclipse gitignore
View .gitignore
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
View QLog.java
package com.bizzby.utils;
import android.util.Log;
import java.io.PrintWriter;
import java.io.StringWriter;
public class QLog
{
View EditTextDialogFragment.java
package com.bizzby.ui.fragments.dialogs;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.text.Editable;
import android.text.Selection;
You can’t perform that action at this time.