Skip to content

Instantly share code, notes, and snippets.

View echirchir's full-sized avatar

Elisha Chirchir echirchir

View GitHub Profile
public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener {
@SuppressWarnings("CanBeFinal")
private OnItemClickListener mListener;
public interface OnItemClickListener {
void onItemClick(View view, int position);
}
@SuppressWarnings("CanBeFinal")
private GestureDetector mGestureDetector;
#!/bin/bash
myproject='myproject'
mywww='public_html'
# initialize project
composer create-project laravel/laravel $myproject --prefer-dist
cd $myproject
# fix paths to public
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
public class ApiModule {
private TwitterApi mApi;
public void init(String token, String tokenSecret) {
OAuthConsumer consumer = new DefaultOAuthConsumer(
Config.TWEET_API_KEY,
Config.TWEET_API_SECRET);
consumer.setTokenWithSecret(token, tokenSecret);