Skip to content

Instantly share code, notes, and snippets.

@JakeWharton
JakeWharton / BaseActivity.java
Created July 6, 2012 01:17
Scoped event bus which automatically registers and unregisters with the lifecycle.
package com.squareup.example;
public abstract BaseActivity extends SherlockActivity {
private final ScopedBus scopedBus = new ScopedBus();
protected ScopedBus getBus() {
return scopedBus;
}
@Override public void onPause() {
@keyboardsurfer
keyboardsurfer / .gitignore
Last active December 11, 2019 01:55
Android gitignore
# Copyright: Benjamin Weiss (keyboardsurfer) https://github.com/keyboardsurfer
# Under CC-BY-SA V3.0 (https://creativecommons.org/licenses/by-sa/3.0/legalcode)
# built application files
*.apk
*.ap_
*.jar
!gradle/wrapper/gradle-wrapper.jar
# lint folder
@khris
khris / build.gradle
Last active December 17, 2015 13:38
(OUTDATED) Real Android appplication project with Gradle
/**
**CAUTION**
This boilerplate code is useless at least about importing dependencies for
support libraries and Google service libraries. See
[this post](https://plus.google.com/u/0/+AndroidDevelopers/posts/4Yhpn6p9icf).
But it is useful for 3rd party libraries that doesn't `aar` yet.