{"id":13902590,"url":"https://github.com/agamkoradiya/Android-Live-Templates","last_synced_at":"2025-07-18T00:31:44.870Z","repository":{"id":41357223,"uuid":"367529775","full_name":"agamkoradiya/Android-Live-Templates","owner":"agamkoradiya","description":"A curated android live templates to make your android development more fast🚀 and easy✨. Import all of them within a minute⌛","archived":false,"fork":false,"pushed_at":"2023-03-26T18:07:46.000Z","size":11802,"stargazers_count":292,"open_issues_count":1,"forks_count":28,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-07-27T10:32:22.221Z","etag":null,"topics":["androdistudio","android","android-studio-live-templates","androidstudiotemplate","live-templates","livetemplate"],"latest_commit_sha":null,"homepage":"","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/agamkoradiya.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-05-15T03:18:57.000Z","updated_at":"2024-07-26T13:37:59.000Z","dependencies_parsed_at":"2024-03-30T23:32:35.871Z","dependency_job_id":"6fe77155-4e9a-40fe-98ec-73407d1bfed3","html_url":"https://github.com/agamkoradiya/Android-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/agamkoradiya%2FAndroid-Live-Templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agamkoradiya%2FAndroid-Live-Templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agamkoradiya%2FAndroid-Live-Templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agamkoradiya%2FAndroid-Live-Templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agamkoradiya","download_url":"https://codeload.github.com/agamkoradiya/Android-Live-Templates/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":214260260,"owners_count":15707070,"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":["androdistudio","android","android-studio-live-templates","androidstudiotemplate","live-templates","livetemplate"],"created_at":"2024-08-06T22:01:13.880Z","updated_at":"2024-08-06T22:03:36.965Z","avatar_url":"https://github.com/agamkoradiya.png","language":null,"funding_links":[],"categories":["Misc"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=%F0%9F%8C%9F\u0026message=If%20Useful\u0026style=style=flat\u0026color=BC4E99\" alt=\"Star Badge\"/\u003e\n\u003c/div\u003e\n\n\u003cimg alt=\"Poster\" src=\"assets/cover_pic.png\"\u003e \u003c/img\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://badgen.net/github/stars/agamkoradiya/Android-Live-Templates\" alt=\"Star Badge\"/\u003e\n  \u003cimg src=\"https://badgen.net/github/forks/agamkoradiya/Android-Live-Templates\" alt=\"Fork Badge\"/\u003e\n  \u003cimg src=\"https://badgen.net/github/contributors/agamkoradiya/Android-Live-Templates\" alt=\"Contributors Badge\"/\u003e\n  \u003cimg src=\"https://badgen.net/github/license/agamkoradiya/Android-Live-Templates\" alt=\"License Badge\"/\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n\n# Content :notebook:\n  - [What is live template? 😮](#what-is-live-template-)\n  - [Demo 💻](#demo-)\n  - [How to *import all live templates* in 1 minute? 💥](#how-to-import-all-live-templates-in-1-minute-)\n  - [CheatSheet for this repository 📄](#cheatsheet-)\n      - [Adapter](#adapters)\n      - [View binding](#view-binding)\n      - [Retrofit library](#retrofit-library)\n      - [Room database](#room-database)\n      - [Dependency Injection](#dependency-injection)\n      - [Drawable](#drawable)\n      - [XML](#xml)\n      - [Util](#util)\n      - [Gradle dependency](#gradle-dependencies)\n  - [How to create your own live templates? 💡](#how-to-create-your-own-live-templates-)\n  - [Suggest me! ✒️](#suggest-me)\n  - [Contribute ❤️](#contribute)\n\n\n## What is live template? 😮\n\u003csamp\u003e Live Templates are code snippets that you can insert into your code by typing their abbreviation and pressing tab.\nBy using them, you can quickly and intelligently add frequently used code patterns and constructs to your code, letting the IDE do the tedious work for you. \u003c/samp\u003e\n\n## Demo 💻\n\u003cimg alt=\"How to import all live templates\" src=\"assets/demoThird.gif\"\u003e \u003c/img\u003e\n\u003cbr\u003e\n\n## How to import all live templates in 1 minute? 💥\n1. Download AndroidLiveTemplates.zip file\n2. Then follow below video tutorial\n\u003cbr\u003e\n\u003cimg alt=\"How to import all live templates\" src=\"assets/howToImport.gif\"\u003e \u003c/img\u003e\n\u003cbr\u003e\n\n\n\n## CheatSheet 📄\n\n\u003ctable\u003e\n\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003e Write Only :keyboard: \u003c/th\u003e\n      \u003cth\u003e You will get :sparkles: \u003c/th\u003e\n    \u003c/tr\u003e\n \u003c/thead\u003e\n\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"/\u003e \n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"2\"\u003e \n      \u003cdiv name=\"adapters\"\u003e\n        :diamonds: Adapters :diamonds: \n      \u003c/div\u003e    \n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"/\u003e\n  \u003c/tr\u003e\n  \n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n\u003ctd\u003e \u003cpre\u003e adapter list \u003c/pre\u003e \u003c/td\u003e\n\u003ctd\u003e\n\n```kotlin \nclass $FILE_NAME$ : androidx.recyclerview.widget.ListAdapter\u003c$TYPE$, $FILE_NAME$.$HOLDER_NAME$ViewHolder\u003e(DiffCallback()) {\n\n    override fun onCreateViewHolder(parent: android.view.ViewGroup, viewType: Int): $HOLDER_NAME$ViewHolder {\n        val binding =\n            $BINDING$.inflate(\n                android.view.LayoutInflater.from(parent.context),\n                parent,\n                false\n            )\n        return $HOLDER_NAME$ViewHolder(binding)\n    }\n\n    override fun onBindViewHolder(holder: $HOLDER_NAME$ViewHolder, position: Int) {\n        val currentItem = getItem(position)\n    }\n\n    inner class $HOLDER_NAME$ViewHolder(private val binding: $BINDING$) :\n        androidx.recyclerview.widget.RecyclerView.ViewHolder(binding.root) {}\n\n    class DiffCallback : androidx.recyclerview.widget.DiffUtil.ItemCallback\u003c$TYPE$\u003e() {\n        override fun areItemsTheSame(oldItem: $TYPE$, newItem: $TYPE$) =\n            oldItem.id == newItem.id\n\n        override fun areContentsTheSame(oldItem: $TYPE$, newItem: $TYPE$) =\n            oldItem == newItem\n    }\n}\n```\n\n\u003c/td\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e adapter normal \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n  class $FILE_NAME$ : androidx.recyclerview.widget.RecyclerView.Adapter\u003c$FILE_NAME$.MyViewHolder\u003e() {\n\n    class MyViewHolder(itemView: android.view.View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView) {}\n\n    override fun onCreateViewHolder(parent: android.view.ViewGroup, viewType: Int): MyViewHolder {\n        return MyViewHolder(\n            android.view.LayoutInflater.from(parent.context).inflate(R.layout.$LAYOUT$, parent, false)\n        )\n    }\n\n    override fun getItemCount(): Int {\n        TODO(\"Not yet implemented\")\n    }\n\n    override fun onBindViewHolder(holder: MyViewHolder, position: Int) {\n        TODO(\"Not yet implemented\")\n    }\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"2\"\u003e \n      \u003cdiv name=\"view-binding\"\u003e\n        :diamonds: View Binding :diamonds: \n      \u003c/div\u003e    \n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n     \n   \u003ctr\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e binding activity \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\nclass $FILE_NAME$ : androidx.appcompat.app.AppCompatActivity() {\n\n    private lateinit var binding: $BINDING_LAYOUT$\n\n    override fun onCreate(savedInstanceState: android.os.Bundle?) {\n        super.onCreate(savedInstanceState)\n        binding = $BINDING_LAYOUT$.inflate(layoutInflater)\n        val view = binding.root\n        setContentView(view)\n    }\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e binding fragment \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\nclass $FILE_NAME$ : androidx.fragment.app.Fragment() {\n\n    private var _binding: $BINDING_LAYOUT$? = null\n    private val binding get() = _binding!!\n\n    override fun onCreateView(\n        inflater: android.view.LayoutInflater,\n        container: android.view.ViewGroup?,\n        savedInstanceState: android.os.Bundle?\n    ): android.view.View {\n        _binding = $BINDING_LAYOUT$.inflate(inflater, container, false)\n        return binding.root\n    }\n\n    override fun onDestroyView() {\n        super.onDestroyView()\n        _binding = null\n    }\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"2\"\u003e \n      \u003cdiv name=\"retrofit-library\"\u003e\n        :diamonds: Retrofit Library :diamonds: \n      \u003c/div\u003e    \n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e retrofit instance \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\nclass $FILE_NAME$ {\n\n    companion object {\n\n        private val retrofit by lazy {\n            val logging = okhttp3.logging.HttpLoggingInterceptor()\n            logging.setLevel(okhttp3.logging.HttpLoggingInterceptor.Level.$TYPE$)\n            val client = okhttp3.OkHttpClient.Builder()\n                .addInterceptor(logging)\n                .build()\n            retrofit2.Retrofit.Builder()\n                .baseUrl($BASE_URL$)\n                .addConverterFactory(retrofit2.converter.gson.GsonConverterFactory.create())\n                .client(client)\n                .build()\n        }\n\n        val api by lazy {\n            retrofit.create($API_NAME$::class.java)\n        }\n    }\n    \n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"2\"\u003e \n      \u003cdiv name=\"room-database\"\u003e\n        :diamonds: Room Database :diamonds: \n      \u003c/div\u003e    \n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n  \n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e room db \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n@androidx.room.Database(\n    entities = [$TABLE_NAME$::class],\n    version = 1,\n    exportSchema = false\n)\n@androidx.room.TypeConverters($CONVERTER_NAME$::class)\nabstract class $FILE_NAME$ : androidx.room.RoomDatabase() {\n\n    abstract fun $DAO_NAME$(): $DAO_TYPE$\n    \n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e room db with singleton \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n@androidx.room.Database(\n    entities = [$TABLE_NAME$::class],\n    version = 1,\n    exportSchema = false\n)\n@androidx.room.TypeConverters($CONVERTER_NAME$::class)\nabstract class $FILE_NAME$ : androidx.room.RoomDatabase() {\n\n    abstract fun $DAO_NAME$(): $DAO_TYPE$\n\n    companion object {\n        @Volatile\n        private var INSTANCE: $FILE_NAME$? = null\n        private val LOCK = Any()\n\n        fun getDatabase(context: android.content.Context): $FILE_NAME$ =\n            INSTANCE ?: synchronized(LOCK) {\n                INSTANCE\n                    ?: buildDatabase(context).also { INSTANCE = it }\n            }\n\n        private fun buildDatabase(context: android.content.Context) =\n            androidx.room.Room.databaseBuilder(\n                context.applicationContext,\n                $FILE_NAME$::class.java, \"$DB_NAME$.db\"\n            ).build()\n    }\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e room dao \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\nimport androidx.room.*\n\n@Dao\ninterface $FILE_NAME$ {\n\n    @Insert(onConflict = OnConflictStrategy.REPLACE)\n    suspend fun insert$TABLE_NAME$($VAR_NAME$: $TABLE_NAME$)\n    \n    @Insert(onConflict = OnConflictStrategy.REPLACE)\n    suspend fun insertAll$TABLE_NAME$(vararg $VAR_NAME$s: $TABLE_NAME$)\n\n    @Update\n    suspend fun update($VAR_NAME$: $TABLE_NAME$)\n\n    @Delete\n    suspend fun delete($VAR_NAME$: $TABLE_NAME$)\n\n    @Query(\"SELECT * FROM $VAR_NAME$\")\n    fun getAll$TABLE_NAME$(): List\u003c$TABLE_NAME$\u003e\n\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e room converter for list of string \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n// List\u003cString\u003e \u003c-\u003e String\n@androidx.room.TypeConverter\nfun fromList(list: List\u003cString\u003e): String {\n    return com.google.gson.Gson().toJson(list)\n}\n\n@androidx.room.TypeConverter\nfun toList(string: String): List\u003cString\u003e {\n    return com.google.gson.Gson().fromJson(string, object : com.google.gson.reflect.TypeToken\u003cList\u003cString\u003e\u003e() {}.type)\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e room converter for date \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n// Date \u003c-\u003e Long\n@androidx.room.TypeConverter\nfun fromTimestamp(value: Long?): java.util.Date? {\n    return value?.let { java.util.Date(it) }\n}\n\n@androidx.room.TypeConverter\nfun dateToTimestamp(date: java.util.Date?): Long? {\n    return date?.time?.toLong()\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e room converter for bitmap \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n// Bitmap \u003c-\u003e ByteArray\n@androidx.room.TypeConverter\nfun fromBitmap(bitmap: android.graphics.Bitmap): ByteArray {\n    val outputStream = java.io.ByteArrayOutputStream()\n    bitmap.compress(android.graphics.Bitmap.CompressFormat.PNG, 100, outputStream)\n    return outputStream.toByteArray()\n}\n\n@androidx.room.TypeConverter\nfun toBitmap(byteArray: ByteArray): android.graphics.Bitmap {\n    return android.graphics.BitmapFactory.decodeByteArray(byteArray, 0, byteArray.size)\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"2\"\u003e \n      \u003cdiv name=\"dependency-injection\"\u003e\n        :diamonds: Dependency Injection :diamonds: \n      \u003c/div\u003e    \n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e di hilt app \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n@dagger.hilt.android.HiltAndroidApp\nclass $FILE_NAME$ : android.app.Application() {\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e di retrofit module \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n@javax.inject.Singleton\n@dagger.Provides\nfun provideRetrofit(): retrofit2.Retrofit =\n    retrofit2.Retrofit.Builder()\n        .baseUrl($BASE_URL$)\n        .addConverterFactory(retrofit2.converter.gson.GsonConverterFactory.create())\n        .build()\n\n@javax.inject.Singleton\n@dagger.Provides\nfun provide$API_NAME$(retrofit: retrofit2.Retrofit): $API$ =\n    retrofit.create($API$::class.java)\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e di room module \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n@javax.inject.Singleton\n@dagger.Provides\nfun provideDatabase(\n    @dagger.hilt.android.qualifiers.ApplicationContext context: android.content.Context\n) = androidx.room.Room.databaseBuilder(\n    context,\n    $DATABASE_CLASS$::class.java,\n    \"$DATABASE_NAME$\"\n).build()\n\n@javax.inject.Singleton\n@dagger.Provides\nfun provideDao(database: $DATABASE_CLASS$) = database.$METHOD$\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"2\"\u003e \n      \u003cdiv name=\"drawable\"\u003e\n        :diamonds: Drawable :diamonds: \n      \u003c/div\u003e    \n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e shape bubble \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\n\u003cshape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\"\u003e\n\n    \u003ccorners\n        android:bottomRightRadius=\"10dp\"\n        android:radius=\"40dp\" /\u003e\n\n    \u003cstroke\n        android:width=\"1dp\"\n        android:color=\"@color/$STROKE_COLOR$\" /\u003e\n\n    \u003csize\n        android:width=\"50dp\"\n        android:height=\"50dp\" /\u003e\n        \n    \u003csolid android:color=\"@color/$SOLID_COLOR$\" /\u003e\n\n\u003c/shape\u003e\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e shape halfcircle \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\n\u003cshape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\"\u003e\n\n    \u003ccorners\n        android:topLeftRadius=\"60dp\"\n        android:topRightRadius=\"60dp\" /\u003e\n\n    \u003csize\n        android:width=\"120dp\"\n        android:height=\"60dp\" /\u003e\n\n    \u003csolid android:color=\"@color/$SOLID_COLOR$\" /\u003e\n\n\u003c/shape\u003e\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e shape line \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\n\u003cshape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"line\"\u003e\n\n    \u003cstroke\n        android:width=\"3dp\"\n        android:color=\"@color/$STROKE_COLOR$\" /\u003e\n\n    \u003csize android:height=\"1dp\" /\u003e\n\n\u003c/shape\u003e\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e shape oval \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\n\u003cshape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"oval\"\u003e\n\n    \u003cstroke\n        android:width=\"3dp\"\n        android:color=\"@color/$STROKE_COLOR$\" /\u003e\n\n    \u003csolid android:color=\"@color/$SOLID_COLOR$\" /\u003e\n\n\u003c/shape\u003e\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e shape ractangle \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\n\u003cshape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\"\u003e\n\n    \u003ccorners android:radius=\"10dp\" /\u003e\n\n    \u003cstroke\n        android:width=\"3dp\"\n        android:color=\"@color/$STROKE_COLOR$\" /\u003e\n\n    \u003csolid android:color=\"@color/$SOLID_COLOR$\" /\u003e\n\n\u003c/shape\u003e\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e shape ring \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\n\u003cshape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"ring\"\n    android:thickness=\"5dp\"\n    android:useLevel=\"false\"\u003e\n    \n    \u003csolid android:color=\"@color/$SOLID_COLOR$\" /\u003e\n\n\u003c/shape\u003e\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e shape round \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\n\u003cshape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:innerRadius=\"0dp\"\n    android:shape=\"ring\"\n    android:thickness=\"100dp\"\n    android:useLevel=\"false\"\u003e\n\n    \u003csolid android:color=\"@color/$SOLID_COLOR$\" /\u003e\n\n\u003c/shape\u003e\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e state list \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\n\u003cselector xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \u003citem android:drawable=\"@drawable/$DRAWABLE1$\" android:state_pressed=\"true\" /\u003e \u003c!-- pressed --\u003e\n    \u003citem android:drawable=\"@drawable/$DRAWABLE2$\" android:state_focused=\"true\" /\u003e \u003c!-- focused --\u003e\n    \u003citem android:drawable=\"@drawable/$DRAWABLE3$\" android:state_hovered=\"true\" /\u003e \u003c!-- hovered --\u003e\n    \u003citem android:drawable=\"@drawable/$DRAWABLE4$\" android:state_selected=\"true\" /\u003e \u003c!-- selected --\u003e\n    \u003citem android:drawable=\"@drawable/$DRAWABLE5$\" android:state_checkable=\"true\" /\u003e \u003c!-- checkable --\u003e\n    \u003citem android:drawable=\"@drawable/$DRAWABLE6$\" android:state_checked=\"true\" /\u003e \u003c!-- checked --\u003e\n    \u003citem android:drawable=\"@drawable/$DRAWABLE7$\" android:state_enabled=\"true\" /\u003e \u003c!-- enabled --\u003e\n    \u003citem android:drawable=\"@drawable/$DRAWABLE8$\" android:state_activated=\"true\" /\u003e \u003c!-- activated --\u003e\n    \u003citem android:drawable=\"@drawable/$DRAWABLE9$\" android:state_window_focused=\"true\" /\u003e \u003c!-- window_focused --\u003e\n    \u003citem android:drawable=\"@drawable/$DRAWABLE$\" /\u003e \u003c!-- default --\u003e\n\u003c/selector\u003e\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"2\"\u003e \n      \u003cdiv name=\"xml\"\u003e\n        :diamonds: XML :diamonds: \n      \u003c/div\u003e    \n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e center_horizontal \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n      app:layout_constraintEnd_toStartOf=\"@+id/$VIEWIDSTART$\"\n      app:layout_constraintStart_toEndOf=\"@+id/$VIEWIDEND$\"\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e center_horizontal_parent \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n      app:layout_constraintEnd_toEndOf=\"parent\"\n      app:layout_constraintStart_toStartOf=\"parent\"\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e center_parent \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n      app:layout_constraintBottom_toBottomOf=\"parent\"\n      app:layout_constraintLeft_toLeftOf=\"parent\"\n      app:layout_constraintRight_toRightOf=\"parent\"\n      app:layout_constraintTop_toTopOf=\"parent\"\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e center_vartical \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n      app:layout_constraintBottom_toTopOf=\"@+id/$VIEWIDTOP$\"\n      app:layout_constraintTop_toBottomOf=\"@+id/$VIEWIDBOTTOM$\"\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e center_vartical_parent \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n      app:layout_constraintBottom_toBottomOf=\"parent\"\n      app:layout_constraintTop_toTopOf=\"parent\"\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e xml_menu \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cmenu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\u003e\n\n    \u003citem\n        android:id=\"@+id/menu_$ID1$\"\n        android:icon=\"@drawable/$ICON1$\"\n        android:title=\"@string/$TITLE1$\"\n        app:showAsAction=\"$ACTION1$\" /\u003e\n\n    \u003citem\n        android:id=\"@+id/menu_$ID2$\"\n        android:icon=\"@drawable/$ICON2$\"\n        android:title=\"@string/$TITLE2$\"\n        app:showAsAction=\"$ACTION2$\" /\u003e\n        \n    \u003citem\n        android:id=\"@+id/menu_$ID3$\"\n        android:icon=\"@drawable/$ICON3$\"\n        android:title=\"@string/$TITLE3$\"\n        app:showAsAction=\"$ACTION3$\" /\u003e\n        \n        \u003citem\n        android:id=\"@+id/menu_$ID4$\"\n        android:icon=\"@drawable/$ICON4$\"\n        android:title=\"@string/$TITLE4$\"\n        app:showAsAction=\"$ACTION4$\" /\u003e\n        \n    \u003citem\n        android:id=\"@+id/menu_$ID5$\"\n        android:icon=\"@drawable/$ICON5$\"\n        android:title=\"@string/$TITLE5$\"\n        app:showAsAction=\"$ACTION5$\" /\u003e\n        \n\u003c/menu\u003e\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"2\"\u003e \n      \u003cdiv name=\"util\"\u003e\n        :diamonds: Util :diamonds: \n      \u003c/div\u003e    \n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e util resource \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\nsealed class Resource\u003cT\u003e(val data: T?, val message: String?) {\n    class Success\u003cT\u003e(data: T) : Resource\u003cT\u003e(data, null)\n    class Error\u003cT\u003e(message: String) : Resource\u003cT\u003e(null, message)\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e util toast \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\nfun android.content.Context.toast(message: CharSequence) =\n    android.widget.Toast.makeText(this, message, android.widget.Toast.$LENGTH$).show()\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"2\"\u003e \n      \u003cdiv name=\"gradle-dependencies\"\u003e\n        :diamonds: Dependencies :diamonds: \n      \u003c/div\u003e    \n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e  \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e view and data binding \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\nbuildFeatures {\n    viewBinding true\n    dataBinding true\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n  \u003ctr\u003e\u003c/tr\u003e\n  \n\u003ctr\u003e\n \u003ctd\u003e \u003cpre\u003e view binding \u003c/pre\u003e \u003c/td\u003e\n \u003ctd\u003e\n\n```kotlin\nbuildFeatures {\n    viewBinding true\n}\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003c/table\u003e\n\n\n## How to create your own live templates? 💡\n\u003cbr\u003e\n\n[Official documentation](https://www.jetbrains.com/help/idea/creating-and-editing-live-templates.html)\n\n[Live template variables](https://www.jetbrains.com/help/idea/template-variables.html)\n\u003cbr\u003e\n\n## Suggest me\n\u003cbr\u003e\n\u003csamp\u003e If you have any suggestion or you want to add any other templates than ping me on \u003c/samp\u003e \u003ca href=\"https://www.instagram.com/code.fun/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Follow-%40code.fun-red?style=social\u0026logo=instagram\" alt=\"Instagram Badge\"/\u003e\u003c/a\u003e\n\u003cbr\u003e\n\n## Contribute\n\u003csamp\u003e Contributions are always welcome!😇 \u003c/samp\u003e\nPlease read the [contribution guidelines](contributing.md) first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagamkoradiya%2FAndroid-Live-Templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagamkoradiya%2FAndroid-Live-Templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagamkoradiya%2FAndroid-Live-Templates/lists"}