Skip to content

Instantly share code, notes, and snippets.

View aldefy's full-sized avatar
📡
Remote work

Adit Lal aldefy

📡
Remote work
View GitHub Profile
@ingyesid
ingyesid / layout.xml
Last active November 27, 2016 07:32
Colored Button Style With AppCompat +22
<Button
android:id="@+id/but_next"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/but_continue"
android:theme="@style/Button.Tinted" />
@AnirudhaAgashe
AnirudhaAgashe / EmptyRecyclerView.java
Last active June 25, 2017 03:00 — forked from meoyawn/EmptyRecyclerView.java
RecyclerView with provosion to add empty view like list view. Displayed when the data set is empty
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
public class EmptyRecyclerView extends RecyclerView {
@imminent
imminent / ExampleActivity.java
Last active October 23, 2017 07:39
Gist for a modified approach to integrating Palette with Picasso proposed by Jake Wharton for the interim while Picasso doesn't have a supported way to pass meta data along the pipeline. http://jakewharton.com/coercing-picasso-to-play-with-palette/
package your.package;
import android.app.Activity;
import android.os.Bundle;
import android.support.v7.graphics.Palette;
import com.squareup.picasso.Picasso;
import your.package.PaletteTransformation;
import static your.package.PaletteTransformation.PaletteCallback;
@nvanbenschoten
nvanbenschoten / SuccessiveClickUtil
Last active August 29, 2015 13:57
An Android utility class handling successive clicks in a given amount of time. Useful for easter eggs or extending default click behavior to more complicated situations.
/**
* Util class handling successive clicks in a given amount of time.
* Useful for easter eggs or extending default click behavior to more
* complicated situations.
*
* Created by Nathan VanBenschoten on 4/1/2014.
* Copyright (c) 2014 Tablelist LLC. All rights reserved.
*/
public class SuccessiveClickUtil {
@rivol
rivol / Util.java
Last active November 29, 2017 06:54
get retrofit error response's body
package com.gateme3.app.util;
import android.location.Location;
import android.location.LocationManager;
import android.util.Log;
import com.gateme3.app.db.PurchasedItem;
import com.gateme3.app.db.Venue;
import java.io.ByteArrayOutputStream;