Skip to content

Instantly share code, notes, and snippets.

View walmyrcarvalho's full-sized avatar
📱
Doing mobile! ❤️

Walmyr Carvalho walmyrcarvalho

📱
Doing mobile! ❤️
View GitHub Profile
/*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
@chris95x8
chris95x8 / build.gradle
Created October 28, 2014 14:00
Extended toolbar with two floating-label edit texts. The layout was made according to this image from the Material Design guidelines: http://i.imgur.com/x8QsuxU.png The layout below looks like this: http://i.imgur.com/8sOTv7h.png
dependencies {
compile 'com.android.support:appcompat-v7:21.+'
compile 'com.wrapp.floatlabelededittext:library:0.0.5'
}
@stefanhoth
stefanhoth / android-libs.md
Last active April 18, 2020 05:02
GDG Android in Berlin brainstorming session Collection of libraries that should be included as of today in a modern Android app-

#GDG Android in Berlin brainstorming session


On November 27, 2013 I was asking the brilliant Android developers at GDG Android in Berlin for their favorite libraries that make their lives easier and should be included in every newly developed app.

This is the list of libraries we collected during this 10 minute session.

Architecture

@kmansoft
kmansoft / drawable_convert.py
Created May 22, 2012 21:39
A simple script to create lower-resolution Android drawables from higher-resolution ones.
#!/usr/bin/python
import sys
import argparse
import os
import re
'''
A simple script to create lower-resolution Android drawables from higher-resolution ones.
@jgilfelt
jgilfelt / whartoff.sh
Created July 24, 2013 21:01
Whartoff - An ActionBarSherlock migration utility. For educational purposes only. Will not migrate project dependencies, static Sherlock attachments, List/ExpandableList/Preference Activities, compatibility MenuItem methods, Sherlock resource references and probably a dozen other use cases. This program will modify your code. Use it at your own …
# Whartoff - An ActionBarSherlock migration utility
#
# usage: whartoff.sh <option> <project directory>
#
# options:
# -c : ActionBarSherlock to compatibility ActionBar
# -n : ActionBarSherlock to native ActionBar
#!/bin/bash
@yoneken
yoneken / remove_CLI_tools.sh
Created August 7, 2012 11:03
Xcode Command Line Tools Uninstaller
# remove_CLI_tools.sh
# written by cocoanetics:http://www.cocoanetics.com/2012/07/you-dont-need-the-xcode-command-line-tools/
# modified by yoneken
#!/bin/sh
RECEIPT_FILE1=/var/db/receipts/com.apple.pkg.DevSDK.bom
RECEIPT_PLIST1=/var/db/receipts/com.apple.pkg.DevSDK.plist
RECEIPT_FILE2=/var/db/receipts/com.apple.pkg.clang.bom
RECEIPT_PLIST2=/var/db/receipts/com.apple.pkg.clang.plist
@romannurik
romannurik / CheatSheet.java
Last active May 16, 2023 13:42
Android helper class for showing cheat sheets (tooltips) for icon-only UI elements on long-press. This is already default platform behavior for icon-only action bar items and tabs. This class provides this behavior for any other such UI element.
/*
* Copyright 2012 Google Inc.
*
* 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
@marcellogalhardo
marcellogalhardo / SavedStateHandle+StateFlow.kt
Last active July 23, 2023 23:46
A helper function to let you expose a MutableStateFlow from a SavedStateHandle.
/**
* 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
*/
@namuol
namuol / INSTALL.md
Last active July 24, 2023 11:53
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.