Skip to content

Instantly share code, notes, and snippets.

@sewerk
Last active August 22, 2016 10:54
Show Gist options
  • Save sewerk/e83283a23188b589ad91 to your computer and use it in GitHub Desktop.
Save sewerk/e83283a23188b589ad91 to your computer and use it in GitHub Desktop.
for Android Studio

standard

  • I or iter or foreach: for each
  • psf: public static final
  • sout: sys.out()
  • serr: sys.err()
  • psvm: main()
  • mx: max()
  • mn: min()
  • lazy: init var
  • inst: instanceof
  • ifn: if null
  • ifnn: if != null
  • geti: getInstance()
  • itar: iterate array
  • itco: iterate collection
  • CD: <![CDATA...

Android

  • fbc: "findViewById with cast"
  • gone: "Set view visibility to GONE"
  • visible: "Set view visibility to VISIBLE"
  • rgC: "get a color from resources"
  • rgS: "get a String from resources"
  • rouiT: "runOnUIThread"
  • Toast: "Create a new Toast"
  • ViewConstructors: "Adds generic view constructors"
  • onEvent: "Adds onEvent method for eventbus"
  • onEventMainThread: "Adds onMainThreadEvent method for eventbus"
  • logd: "Log.d(TAG, String)"
  • logm: "Log method name and its arguments"
  • logr: "Log result of this method"
  • logt: "A static logtag with your current classname"

AndroidXML.xml

  • appNs: "adds application namespace"
  • lh: "android:layout_height="""
  • lhm: "android:layout_height="match_parent""
  • lhw: "android:layout_height="wrap_content""
  • lw: "android:layout_width="""
  • lwm: "android:layout_width="match_parent""
  • lww: "android:layout_width="wrap_content""
  • toolsNs: "adds tools namespace to Android xml file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment