Skip to content

Instantly share code, notes, and snippets.

Dorian Cussen doridori

Block or report user

Report or block doridori

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
@staltz
staltz / introrx.md
Last active Sep 20, 2019
The introduction to Reactive Programming you've been missing
View introrx.md
@seanKenkeremath
seanKenkeremath / Android Lollipop Widget Tinting Guide
Last active Sep 16, 2019
How base colors in Lollipop apply to different UI elements
View Android Lollipop Widget Tinting Guide
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
* ripple effect (Lollipop only) -- "colorControlHighlight"
Status Bar:
------------
* background (Lollipop only) - "colorPrimaryDark"
@emil2k
emil2k / Connectivity.java
Last active Sep 11, 2019
Android utility class for checking device's network connectivity and speed.
View Connectivity.java
/*
* Copyright (c) 2017 Emil Davtyan
*
* 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 furnished to do so, subject to
* the following conditions:
@orip
orip / GsonHelper.java
Created Sep 5, 2012
Gson type adapter to serialize and deserialize byte arrays in base64
View GsonHelper.java
import java.lang.reflect.Type;
import android.util.Base64;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
@florianmski
florianmski / convertLocalizable.rb
Created Aug 23, 2012
Convert your Localizable.strings (iOS) to strings.xml (Android)
View convertLocalizable.rb
#!/usr/bin/ruby
# based on https://github.com/tmurakam/cashflow/blob/0a01ac9e0350dfb04979986444244f8daf4cb5a8/android/convertStrings.rb
# support comments and Converter such as "%@", "%d", "%0.1f"...
# in your directory : ./main.rb Localizable.strings
file = File.open("strings.xml", "w");
file.puts "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
file.puts "<resources>"
View RobolectricGradleSetup.md

Set up Robolectric with Gradle

  1. Open your top level build.gradle file.

  2. Add Sonatype repo to buildscript repositories and Square Gradle Android Test Plugin to buildscript dependencies. (Older Gradle projects may automatically put this buildscript code in your project build.gradle, in which situation you should put the following in that file.)

@chrisjenx
chrisjenx / FragmentHolderActivity.java
Last active Dec 13, 2015
FragmentHolderActivity
View FragmentHolderActivity.java
package com.bizzby.ui.activities;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.WindowManager;
import com.bizzby.ui.fragments.BaseIncludeFragment;
import com.bizzby.utils.QLog;
You can’t perform that action at this time.