{"id":15374114,"url":"https://github.com/mrmike/androidlivetemplates","last_synced_at":"2025-04-14T08:20:19.859Z","repository":{"id":17280787,"uuid":"20050868","full_name":"mrmike/AndroidLiveTemplates","owner":"mrmike","description":"Live Templates set for Android Studio / Intellij IDEA. ","archived":false,"fork":false,"pushed_at":"2015-03-29T17:20:50.000Z","size":159,"stargazers_count":52,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T21:52:01.417Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/mrmike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-22T06:49:55.000Z","updated_at":"2020-06-12T16:11:53.000Z","dependencies_parsed_at":"2022-07-20T16:49:10.515Z","dependency_job_id":null,"html_url":"https://github.com/mrmike/AndroidLiveTemplates","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/mrmike%2FAndroidLiveTemplates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmike%2FAndroidLiveTemplates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmike%2FAndroidLiveTemplates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmike%2FAndroidLiveTemplates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrmike","download_url":"https://codeload.github.com/mrmike/AndroidLiveTemplates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844036,"owners_count":21170505,"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":[],"created_at":"2024-10-01T13:57:18.852Z","updated_at":"2025-04-14T08:20:19.829Z","avatar_url":"https://github.com/mrmike.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Android Live Templates\n====================\n\nLive Templates set for Android Studio / Intellij IDEA. \n\n## Installation\n\nTo get template file you can use `wget`:\n```\nwget https://raw.githubusercontent.com/mrmike/AndroidLiveTemplates/master/Android.xml\n```\n\nAnd then copy `Android.xml` file to one of the locations:\n\n###**Windows:** \n```\n\u003cyour home directory\u003e\\.\u003cproduct name\u003e\u003cversion number\u003e\\config\\templates\n```\n\n###**Linux:**\n```\n~\\.\u003cproduct name\u003e\u003cversion number\u003e\\config\\templates\n```\n\n\n###**MacOS:** \n```\n~/Library/Preferences/\u003cproduct name\u003e\u003cversion number\u003e/templates\n```\n\n\n## Usage\n\nDuring code editing type one of the template name and press tab.\n\n### Templates list\n\n* ld - Send a DEBUG log message.\n```\nLog.d(\"$TAG$\", \"$MSG$\");\n```\n* le - Send a ERROR log message.\n```\nLog.e(\"$TAG$\", \"$MSG$\");\n```\n* li - Send a INFO log message.\n```\nLog.i(\"$TAG$\", \"$MSG$\");\n```\n* lw - Send a WARN log message.\n```\nLog.w(\"$TAG$\", \"$MSG$\");\n```\n* lv - Send a VERBOSE log message.\n```\nLog.v(\"$TAG$\", \"$MSG$\");\n```\n* wtf - What a Terrible Failure: Report an exception that should never happen.\n```\nLog.wtf(\"$TAG$\", \"$MSG$\");\n```\n\n* toast - show toast\n```\nToast.makeText($context$, $msg$, Toast.LENGTH_SHORT).show();\n```\n* profile - measure exceution time\n```\nfinal long start = System.currentTimeMillis();\n$END$\nLog.d(\"profiling\", \"[$methodName$]:\" + (System.currentTimeMillis() - start));\n```\n* view (**ButterKnife**) - inject view\n```\n@InjectView(R.id.$VIEW$)\n$TYPE$ $NAME$\n```\n* click (**ButterKnife**) - add OnClickListener\n```\n@OnClick(R.id.$VIEW$)\nvoid on$NAME$Click() {\n    $END$\n}\n```\n* android - Add android namespace (**XML**)\n```\nxmlns:android=\"http://schemas.android.com/apk/res/android\"\n```\n* tools - Add tools namespace (**XML**)\n```\nxmlns:tools=\"http://schemas.android.com/tools\"\n```\n* ttext - Add tools:text attribute\n```\ntools:text=\"$text$\"\n```\n\n* ps - Create private static final String field.\n```\nprivate static final String $NAME$ = \"$VALUE$\";\n```\n\n* pi - Create private static final int field.\n```\nprivate static final int $NAME$ = $VALUE$;\n```\n\n* pf - Create private static final float field.\n```\nprivate static final float $NAME$ = $VALUE$;\n```\n\n* pd - Create private static final double field.\n```\nprivate static final double $NAME$ = $VALUE$;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmike%2Fandroidlivetemplates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrmike%2Fandroidlivetemplates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmike%2Fandroidlivetemplates/lists"}