Skip to content

Instantly share code, notes, and snippets.

View guiguegon's full-sized avatar
🏠
Working from home

Guillermo Guerrero González guiguegon

🏠
Working from home
View GitHub Profile
@guiguegon
guiguegon / Android Lollipop Widget Tinting Guide
Created September 28, 2015 11:25 — forked from seanKenkeremath/Android Lollipop Widget Tinting Guide
How base colors in Lollipop apply to different UI elements
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"
@guiguegon
guiguegon / CustomPlugin.groovy
Created September 22, 2016 06:20
Gradle rename plugin
class CustomPlugin implements Plugin<Project> {
@Override
void apply(Project project) {
project.task('renameAppVersionName', type: RenameAppVersionNameTask)
project.tasks.getByName('preBuild').dependsOn('renameAppVersionName')
}
}
@guiguegon
guiguegon / AndroidStyle.xml
Last active September 22, 2016 08:53
Android Code Style
<code_scheme name="AndroidStyle">
<option name="USE_SAME_INDENTS" value="true" />
<option name="IGNORE_SAME_INDENTS_FOR_LANGUAGES" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>