Skip to content

Instantly share code, notes, and snippets.

View codebreaker's full-sized avatar

Jagadeeshwaran K codebreaker

View GitHub Profile
@codebreaker
codebreaker / Oauth1SigningInterceptor.java
Created February 26, 2018 00:38 — forked from serj-lotutovici/Oauth1SigningInterceptor.java
An OkHttp interceptor which does OAuth1 signing. Requires Java 7 (but can easily be ported to Java 6).
/*
* Copyright (C) 2015 Jake Wharton
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@codebreaker
codebreaker / 0_reuse_code.js
Created March 23, 2016 05:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@codebreaker
codebreaker / TabLayoutHelper.java
Last active March 23, 2016 05:50 — forked from mikovali/TabLayoutHelper.java
Tinted icons for TabLayout in Android design support library with ViewPager
package io.github.mikovali.android;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
import android.support.annotation.DrawableRes;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.content.res.ResourcesCompat;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v4.view.PagerAdapter;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.NinePatch;
import android.graphics.Rect;
import android.graphics.drawable.NinePatchDrawable;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
/**
public abstract class RightDrawableOnTouchListener implements OnTouchListener {
Drawable drawable;
private int fuzz = 10;
/**
* @param keyword
*/
public RightDrawableOnTouchListener(TextView view) {
super();
final Drawable[] drawables = view.getCompoundDrawables();
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<!-- FOR Camera -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<!-- Don't require camera, as this requires a rear camera. This allows it to work on the Nexus 7 -->
@codebreaker
codebreaker / DemoAdapter.java
Last active December 15, 2015 20:19
A default adapter with viewholder and getview () method
package com.example.anim_play.adapter;
import java.util.List;
import org.json.JSONObject;
import com.example.anim_play.R;
import android.app.Activity;
import android.view.View;