Coder Social home page Coder Social logo

idea-live-templates's Introduction

##What is this? A collection of useful live templates that you can use within your AndroidStudio or IntelliJ IDEA installation.

##I can haz? Yes. Simply clone the repository to your AndroidStudio's config/templates folder.

JetBrains has you covered in finding the location of this folder.

Once you found it, cd into it, run git clone https://github.com/keyboardsurfer/idea-live-templates . and restart AndroidStudio.

##Currently included live templates

Android.xml

  • fbc: "findViewById with cast"
  • foreach: "Create a for each loop"
  • IntentView: "Creates an Intent with ACTION_VIEW"
  • logd: "Log.d(TAG, String)"
  • loge: "Log.e(TAG, String)"
  • logi: "Log.i(TAG, String)"
  • LogTag: "A static logtag with your current classname"
  • newInstance: "create a new Fragment instance with arguments"
  • pf: "private static final variable with type and member"
  • psf: "private static final variable with type and member"
  • rgC: "get a color from resources"
  • rgS: "get a String from resources"
  • rouiT: "runOnUIThread"
  • sbc: "block comment for structuring code"
  • Sfmt: "String format"
  • Toast: "Create a new Toast"
  • ViewConstructors: "Adds generic view constructors"
  • wrapIt: "adds a gradle wrapper task"
  • wtf: "Log.wtf(TAG, String)"

AndroidComments.xml

  • ccode: "code tag for javadoc"
  • cfalse: "puts false in a comment section"
  • clink: "link from within javadoc"
  • ctrue: "puts true in a comment section"
  • fixme: "adds //FIXME"
  • noop: "indicate that a method does not have any operations"
  • stopship: "adds //STOPSHIP"
  • todo: "adds //TODO"

AndroidExternal.xml

  • Crouton: "Creates a new Crouton"
  • CroutonFragment: "Creates a new Crouton for display within a fragment"
  • CroutonShow: "Creates a new Crouton with Crouton.showText"
  • onEvent: "Adds onEvent method for eventbus"
  • onEventMainThread: "Adds onMainThreadEvent method for eventbus"

AndroidParcelable.xml

  • Parcelable: "Create a parcelable block for your current class"
  • ParcelableEnum: "Create a parcelable block for your current enum"
  • ParcelableEnumTest: "Creates basic parcelable enum test methods"
  • ParcelBoolean: "writes a single boolean value to a parcel"
  • UnparcelBoolean: "reads a single boolean value from a parcel"
  • UnparcelIntArray: "Unparcels an int array"
  • UnparcelStringArray: "Unparcels a String array"

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"

##Contribution

  1. Fork
  2. Add your own live templates
  3. Send me a pull request
  4. Wait
  5. Profit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.