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
@PurpleBooth
PurpleBooth / README-Template.md
Last active Nov 19, 2019
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mjohnsullivan
mjohnsullivan / TimerActivity.java
Created Jul 9, 2015
Example of how to create a long running timer service that survives activity destruction by moving to the foreground, and back to the background when a new activity bind to it.
View TimerActivity.java
//
// Copyright 2015 Google Inc. All Rights Reserved.
//
// 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
@mcginty
mcginty / material_colors.xml
Last active May 1, 2019
Android XML resource with the full material color palette. Source: http://www.google.com/design/spec/style/color.html#color-color-palette
View material_colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="material_red50">#ffffebee</color>
<color name="material_red100">#ffffcdd2</color>
<color name="material_red200">#ffef9a9a</color>
<color name="material_red300">#ffe57373</color>
<color name="material_red400">#ffef5350</color>
<color name="material_red500">#fff44336</color>
<color name="material_red600">#ffe53935</color>
<color name="material_red700">#ffd32f2f</color>
@drtriumph
drtriumph / package.json
Last active Nov 18, 2019
Firebase Queue Example
View package.json
{
"name": "my-queue",
"version": "1.0.0",
"description": "My Queue",
"main": "queue_worker.js",
"dependencies": {
"firebase": "2.x",
"firebase-queue": "^1.0.0"
}
}
@pyricau
pyricau / LeakSlackUploadService.java
Created May 9, 2015
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;
@avrahamshukron
avrahamshukron / activity
Created May 2, 2015
FloatingActionButton dimming
View activity
@Override
public void onMenuToggle(final boolean isOpen) {
setBackgroundDimming(isOpen);
}
private void setBackgroundDimming(boolean dimmed) {
final float targetAlpha = dimmed ? 1f : 0;
final int endVisibility = dimmed ? View.VISIBLE : View.GONE;
mDimmerView.setVisibility(View.VISIBLE);
mDimmerView.animate()
@yrom
yrom / SpacesItemDecoration.java
Last active Sep 2, 2018
SpacesItemDecoration for RecyclerView.
View SpacesItemDecoration.java
import android.graphics.Rect;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
public class SpacesItemDecoration extends RecyclerView.ItemDecoration {
private int space;
private int spanCount;
private int lastItemInFirstLane = -1;
public SpacesItemDecoration(int space) {
@nickbutcher
nickbutcher / 1 search_bar.xml
Last active Aug 26, 2019
Demonstrating morphing a search icon into a search field. To do this we use an AnimatedVectorDrawable (https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html) made up of two paths. The first is the search icon (as a single line) the second is the horizontal bar. We then animate the 'trimPathStart' property …
View 1 search_bar.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
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
@lapastillaroja
lapastillaroja / DividerItemDecoration.java
Last active Jan 24, 2019 — forked from akmalxxx/DividerItemDecoration.java
DividerItemDecoration. RecyclerView.ItemDecoration simple implementation
View DividerItemDecoration.java
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;
@Shywim
Shywim / CursorRecyclerAdapter.java
Last active Oct 17, 2019
A custom Adapter for the new RecyclerView, behaving like the CursorAdapter class from previous ListView and alike. Now with Filters and updated doc.
View CursorRecyclerAdapter.java
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Matthieu Harlé
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
You can’t perform that action at this time.