Skip to content

Instantly share code, notes, and snippets.

@kamirbarron
Forked from geekygecko/android.md
Created June 4, 2019 01:54
Show Gist options
  • Save kamirbarron/3804d567a44a83333ec109964bbe4103 to your computer and use it in GitHub Desktop.
Save kamirbarron/3804d567a44a83333ec109964bbe4103 to your computer and use it in GitHub Desktop.
Android Cheat Sheet

Android Cheat Sheet

Developer tips

Record a video of your app

Developer options -> Check show touches
adb shell screenrecord /sdcard/video.mp4
adb pull /sdcard/video.mp4

Logcat two devices

adb devices
adb -s SA5A330471 logcat | grep --line-buffered Playback

Styles

Font family

android:fontFamily="sans-serif"                 // roboto regular
android:fontFamily="sans-serif-light"           // roboto light
android:fontFamily="sans-serif-condensed"       // roboto condensed
android:fontFamily="sans-serif-condensed-light" // roboto condensed light
android:fontFamily="sans-serif-thin"            // roboto thin (android 4.2)
android:fontFamily="sans-serif-medium"          // roboto medium (android 5.0)

XML layouts

// android
xmlns:android="http://schemas.android.com/apk/res/android"
// library extension
xmlns:fab="http://schemas.android.com/apk/res-auto"
// designer tools
xmlns:tools="http://schemas.android.com/tools"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment