Skip to content

Instantly share code, notes, and snippets.

Doing mobile! ❤️

Walmyr Carvalho walmyrcarvalho

Doing mobile! ❤️
View GitHub Profile
marcellogalhardo / SavedStateHandle+StateFlow.kt
Last active Mar 7, 2022
A helper function to let you expose a MutableStateFlow from a SavedStateHandle.
View SavedStateHandle+StateFlow.kt
* Returns a [StateFlow] that access data associated with the given key.
* @param scope The scope used to synchronize the [StateFlow] and [SavedStateHandle]
* @param key The identifier for the value
* @param initialValue If no value exists with the given [key], a new one is created
* with the given [initialValue].
* @see SavedStateHandle.getLiveData
agrcrobles /
Last active May 16, 2022 — forked from patrickhammond/
Setup Android SDK on OSX with and without the android studio

Hi, I am a fork from

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites: instead ?

stkent /
Last active Apr 26, 2022
Android Bluetooth Low Energy (BLE) Resources
View Reactive Conf - Thinking metrics on React

This is a proposal for a lightning talk at the Reactive 2016 conference. If you like this, star the Gist.

Thinking metrics on React applications

In regular websites, it is common to send multiple events to track user clicks. Single Page Applications change the way you look at metrics. This is a talk about a simple pattern we created at to manage a metrics layer for The talk will cover how to track user flow using Google Analytics and other services. We solved the challenge of tying metrics and components, keeping information across pages and having global data. Also some React, React Router and React Side Effects concepts like context, higher order components, history state will be covered.

chris95x8 / build.gradle
Created Oct 28, 2014
Extended toolbar with two floating-label edit texts. The layout was made according to this image from the Material Design guidelines: The layout below looks like this:
View build.gradle
dependencies {
compile ''
compile 'com.wrapp.floatlabelededittext:library:0.0.5'
rallat / dexmethodcount
Last active Dec 14, 2015
Android Dex Method Count more sophisticated scripts that gives you method cound by package @JakeWharton and @tsmith
View dexmethodcount
You can add this to your shell profile and then use it as dexcount file.
This file should have a classes.dex in order to work, that means it has to be a android lib project or android apk.
mkdir temp >/dev/null
cp $1 temp/$1+copy > /dev/null
unzip temp/$1+copy -d temp/ > /dev/null
cat temp/classes.dex | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'
rm -R temp > /dev/null
View android_material_design_colours.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- google's material design colours from -->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
staltz /
Last active May 25, 2022
The introduction to Reactive Programming you've been missing
public class CircularProgressDrawable extends Drawable
implements Animatable {
private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator();
private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator();
private static final int ANGLE_ANIMATOR_DURATION = 2000;
private static final int SWEEP_ANIMATOR_DURATION = 600;
private static final int MIN_SWEEP_ANGLE = 30;
private final RectF fBounds = new RectF();
* Copyright (C) 2014 Chris Banes
* 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
* Unless required by applicable law or agreed to in writing, software