Skip to content

Instantly share code, notes, and snippets.

View kroegerama's full-sized avatar
🦊
Shmebulock

kroegerama

🦊
Shmebulock
View GitHub Profile
@jamesonwilliams
jamesonwilliams / aws-appsync-with-apollo-2.2.0.md
Last active March 4, 2021 21:58
Using AWS AppSync with Apollo Android 2.2.0

Hitting AWS AppSync from Apollo Android 2.2.0

This document describes howto setup an AppSync endpoint, and talk to it using the Apollo Android 2.2.0 client.

Deploy an AppSync endpoint

In the AWS AppSync console, I created a new endpoint here, by selecting the "Event app" under "Start from a sample project."

@eashish93
eashish93 / material_colors.js
Created September 29, 2017 13:54
Material Colors in JS (For Use in JS based CSS)
// This version is specially built for used in css-in-js solution.
// You can specifically import single colors to take advantage of webpack. For eg: import {red_50} from 'material_colors'
// This one consist of flat naming instead of this json based : https://gist.github.com/kawanet/a880c83f06d6baf742e45ac9ac52af96
module.exports = {
// red
'red_50': '#ffebee',
'red_100': '#ffcdd2',
'red_200': '#ef9a9a',
'red_300': '#e57373',
@lopspower
lopspower / README.md
Last active January 19, 2024 10:54
What's difference between -nodpi and -anydpi?

Difference between -nodpi and -anydpi

Android Studio exposes developers to -nodpi and -anydpi in various places. For example, if you use the New Resource Directory wizard thing, and you choose to add a density qualifier to the directory, you will see "No Density" (-nodpi) and "Any Density" (-anydpi) options.

Some of you might expect these to be well-documented.

In a word, no.

However, courtesy of a fair amount of experimentation (largely done as part of work on this Stack Overflow question and this answer), their use becomes at least a bit clearer. Many thanks to Stack Overflow user rds for the help!

@imminent
imminent / Api.java
Last active June 13, 2023 02:50
Call retrying with Retrofit 2.0
package com.example.api;
import java.util.Map;
import retrofit.Call;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
public interface Api {
@JakeWharton
JakeWharton / HierarchyTreeChangeListener.java
Last active March 16, 2022 02:17
A hierarchy change listener which recursively monitors and entire tree of views. Apache 2.
import android.view.View;
import android.view.ViewGroup;
/**
* A {@link ViewGroup.OnHierarchyChangeListener hierarchy change listener} which recursively
* monitors an entire tree of views.
*/
public final class HierarchyTreeChangeListener implements ViewGroup.OnHierarchyChangeListener {
/**
* Wrap a regular {@link ViewGroup.OnHierarchyChangeListener hierarchy change listener} with one