Skip to content

Instantly share code, notes, and snippets.

@jamie-beardedhen
jamie-beardedhen / activity_main.xml
Created June 26, 2015 17:03
scrolling toolbar with multiple fragments
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinatorLayout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<android.support.design.widget.AppBarLayout
@jamie-beardedhen
jamie-beardedhen / gist:47d7820e26310c30a695
Created March 18, 2015 11:42
Generate APK with useful version info
android {
applicationVariants.all { variant ->
variant.outputs.each { output ->
def appName = "MyAwesomeApp"
def filename = appName + "_" + defaultConfig.versionName + "_(" + defaultConfig.versionCode + ").apk"
output.outputFile = new File(output.outputFile.parent, filename)
}
}
}