{"id":13478897,"url":"https://github.com/keyboardsurfer/idea-live-templates","last_synced_at":"2025-05-16T09:02:32.435Z","repository":{"id":5845921,"uuid":"7062395","full_name":"keyboardsurfer/idea-live-templates","owner":"keyboardsurfer","description":"An #androidDev collection of Live Templates for Android Studio","archived":false,"fork":false,"pushed_at":"2016-02-03T16:16:08.000Z","size":104,"stargazers_count":1595,"open_issues_count":0,"forks_count":267,"subscribers_count":75,"default_branch":"master","last_synced_at":"2025-04-09T03:12:53.680Z","etag":null,"topics":["android-studio","android-studio-template"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keyboardsurfer.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-08T00:51:31.000Z","updated_at":"2025-04-06T01:09:55.000Z","dependencies_parsed_at":"2022-08-31T15:42:56.261Z","dependency_job_id":null,"html_url":"https://github.com/keyboardsurfer/idea-live-templates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keyboardsurfer%2Fidea-live-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keyboardsurfer%2Fidea-live-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keyboardsurfer%2Fidea-live-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keyboardsurfer%2Fidea-live-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keyboardsurfer","download_url":"https://codeload.github.com/keyboardsurfer/idea-live-templates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501548,"owners_count":22081526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-studio","android-studio-template"],"created_at":"2024-07-31T16:02:05.397Z","updated_at":"2025-05-16T09:02:32.410Z","avatar_url":"https://github.com/keyboardsurfer.png","language":"Shell","funding_links":[],"categories":["Shell","Android Studio"],"sub_categories":["Live Templates"],"readme":"## What is this?\n\nA collection of useful live templates that you can use within your\nAndroidStudio or IntelliJ IDEA installation.\n\n## I can haz?\n\nAll vanilla Android templates live within Android Studio since version 1.5.\nSo if you're happy with the defaults there's no need for you to use this\nrepository any more. Just install a recent version of Android Studio and you're\nall set.\n\nIf you want to make your own live templates this collection can be used as\nstarting point. To get started, simply clone this repository to your\nAndroid Studio's config/templates folder.\n\nJetBrains [has you covered](https://www.jetbrains.com/idea/webhelp/live-templates.html)\nin finding the location of this folder.\n\nOnce you found it, `cd` into it,\nrun `git clone https://github.com/keyboardsurfer/idea-live-templates .`\nand restart AndroidStudio.\n\n## Included live templates\n\u003csmall\u003e*the doc is generated by `./listCurrentTemplates`*\u003csmall\u003e\n\n### Android.xml\n- **`const`**: \"Define android style int constant\"\n- **`fbc`**: \"findViewById with cast\"\n- **`foreach`**: \"Create a for each loop\"\n- **`gone`**: \"Set view visibility to GONE\"\n- **`IntentView`**: \"Creates an Intent with ACTION_VIEW\"\n- **`key`**: \"Key for a bundle\"\n- **`newInstance`**: \"create a new Fragment instance with arguments\"\n- **`noInstance`**: \"private empty constructor to prohibit instance creation\"\n- **`rgS`**: \"get a String from resources\"\n- **`rouiT`**: \"runOnUIThread\"\n- **`sbc`**: \"block comment for structuring code\"\n- **`Sfmt`**: \"String format\"\n- **`starter`**: \"Creates a static start(...) helper method to start an Activity\"\n- **`Toast`**: \"Create a new Toast\"\n- **`ViewConstructors`**: \"Adds generic view constructors\"\n- **`visible`**: \"Set view visibility to VISIBLE\"\n- **`wrapIt`**: \"adds a gradle wrapper task\"\n\n### AndroidComments.xml\n- **`ccode`**: \"code tag for javadoc\"\n- **`cfalse`**: \"puts false in a comment section\"\n- **`clink`**: \"link from within javadoc\"\n- **`ctrue`**: \"puts true in a comment section\"\n- **`fixme`**: \"adds // FIXME\"\n- **`noop`**: \"indicate that a method does not have any operations\"\n- **`stopship`**: \"adds // STOPSHIP\"\n- **`todo`**: \"adds // TODO\"\n\n### AndroidExternal.xml\n- **`createObservable`**: \"Create RxJava Observable\"\n- **`Crouton`**: \"Creates a new Crouton\"\n- **`CroutonFragment`**: \"Creates a new Crouton for display within a fragment\"\n- **`CroutonShow`**: \"Creates a new Crouton with Crouton.showText\"\n- **`onEvent`**: \"Adds onEvent method for eventbus\"\n- **`onEventMainThread`**: \"Adds onMainThreadEvent method for eventbus\"\n\n### AndroidLog.xml\n- **`logd`**: \"Log.d(TAG, String)\"\n- **`loge`**: \"Log.e(TAG, String, Exception)\"\n- **`logi`**: \"Log.i(TAG, String)\"\n- **`logm`**: \"Log method name and its arguments\"\n- **`logr`**: \"Log result of this method\"\n- **`logt`**: \"A static logtag with your current classname\"\n- **`logw`**: \"Log.w(TAG, String, Exception)\"\n- **`wtf`**: \"Log.wtf(TAG, String, Exception)\"\n\n### AndroidParcelable.xml\n- **`Parcelable`**: \"Create a parcelable block for your current class\"\n- **`ParcelableEnum`**: \"Create a parcelable block for your current enum\"\n- **`ParcelableEnumTest`**: \"Creates basic parcelable enum test methods\"\n- **`ParcelBoolean`**: \"writes a single boolean value to a parcel\"\n- **`UnparcelBoolean`**: \"reads a single boolean value from a parcel\"\n- **`UnparcelIntArray`**: \"Unparcels an int array\"\n- **`UnparcelStringArray`**: \"Unparcels a String array\"\n\n### AndroidXML.xml\n- **`appNs`**: \"adds application namespace\"\n- **`lh`**: \"android:layout_height=\u0026quot;\u0026quot;\"\n- **`lhm`**: \"android:layout_height=\u0026quot;match_parent\u0026quot;\"\n- **`lhw`**: \"android:layout_height=\u0026quot;wrap_content\u0026quot;\"\n- **`lw`**: \"android:layout_width=\u0026quot;\u0026quot;\"\n- **`lwm`**: \"android:layout_width=\u0026quot;match_parent\u0026quot;\"\n- **`lww`**: \"android:layout_width=\u0026quot;wrap_content\u0026quot;\"\n- **`toolsNs`**: \"adds tools namespace to Android xml file\"\n\n## Contribution to this collection\n\nIf you want to add a core Android template, do so directly within\nthe AOSP.\nThe project the live templates live in is `platform/tools/adt/idea`.\nThe path within the project is `android/resources/liveTemplates`.\n\nThe Android tools team provides [further documentation](http://tools.android.com/build)\nas well as info on which branch to build.\n\nIf you want to supply a template that is not core Android but useful, follow this guide:\n\n0. Sign the [CLA](CONTRIBUTING.md)\n1. Fork the project\n2. Add your own live templates\n3. Run `./listCurrentTemplates.sh` and insert the relevant output in the README.md\n4. Send a pull request\n5. Wait\n6. Profit\n\n## License\n\n```\nCopyright 2016, The Android Open Source Project\n\nLicensed to the Apache Software Foundation (ASF) under one or more contributor\nlicense agreements. See the NOTICE file distributed with this work for\nadditional information regarding copyright ownership. The ASF licenses this\nfile to you under the Apache License, Version 2.0 (the \"License\"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeyboardsurfer%2Fidea-live-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeyboardsurfer%2Fidea-live-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeyboardsurfer%2Fidea-live-templates/lists"}