Skip to content

Instantly share code, notes, and snippets.

Emin Yahyayev ewintory

Block or report user

Report or block ewintory

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Add this as a debug manifest so the permissions won't be required by your production app -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
</manifest>
View gist:9a5b8c3d860e6e193f03c5665b4a5f8e
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ewintory
ewintory / LeakSlackUploadService.java
Created Feb 16, 2016 — forked from pyricau/LeakSlackUploadService.java
Sending Leak Traces to a Slack Channel (and HipChat, see the comments)
View LeakSlackUploadService.java
import android.util.Log;
import com.squareup.leakcanary.AnalysisResult;
import com.squareup.leakcanary.DisplayLeakService;
import com.squareup.leakcanary.HeapDump;
import retrofit.RestAdapter;
import retrofit.RetrofitError;
import retrofit.http.Multipart;
import retrofit.http.POST;
import retrofit.http.Part;
import retrofit.mime.TypedFile;
View bootstrap_data
{
"configuration": {
"navdrawer_extra_1_url": "http://extra1.com",
"navdrawer_extra_2_url": "http://extra2.com",
"navdrawer_extra_3_url": "http://extra3.com",
"navdrawer_extra_4_url": "http://extra4.com"
},
"tabs": [
{
"active": true,
View MoviesAdapter.java
package com.ewintory.udacity.popularmovies.ui.adapter;
import android.graphics.PorterDuff;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v7.graphics.Palette;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
@ewintory
ewintory / gist:9e63de9c96e4cd097dbc
Created Aug 31, 2015
Gradle: packs the project
View gist:9e63de9c96e4cd097dbc
task copyApkForZip(type: Copy) {
from 'build/outputs/apk'
into '../apk'
include '**/app-release.apk'
}
task zipBackup(type: Zip) {
dependsOn "copyApkForZip"
from('../'){
exclude "**/build"
@ewintory
ewintory / MainActivity.java
Last active Aug 29, 2015 — forked from blackcj/MainActivity.java
Design support library with CoordinatorLayout, SwipeRefreshLayout and RecyclerView.
View MainActivity.java
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.TabLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import com.blackcj.designsupportexample.adapters.RecyclerViewAdapter;
View EndlessAdapter.java
package com.ewintory.udacity.popularmovies.ui.adapter;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import com.ewintory.udacity.popularmovies.R;
@ewintory
ewintory / AspectLockedCardView.java
Created Jul 18, 2015
Based on CommonsWare's AspectLockedFrameLayout
View AspectLockedCardView.java
package az.dgtl.egg.ui.widget;
import android.content.Context;
import android.support.v7.widget.CardView;
import android.util.AttributeSet;
import android.view.View;
/**
* Based on CommonsWare's AspectLockedFrameLayout
*/
@ewintory
ewintory / PicassoScrollListener.java
Last active Aug 29, 2015
Simple {@link RecyclerView.OnScrollListener} implementation which pauses/resumes Picasso's tagged requests
View PicassoScrollListener.java
package com.ewintory.udacity.popularmovies.utils;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.RequestCreator;
/**
* Simple {@link RecyclerView.OnScrollListener} implementation which
You can’t perform that action at this time.