Skip to content

🚀 A curated android templates to make android development more easy and fast 🔋 !

License

Notifications You must be signed in to change notification settings

pranaypatel512/AndroidLiveTemplates

Repository files navigation

banner

AndroidLiveTemplates

🚀 A curated android templates to make android development more easy and fast🔋!

💡 Goal

The main idea behind this repo is to share basic android development template which helps developers to write less code.

🔨 How to use:

Step 1: First download latest AndroidLiveTemplates from Live_templates_android.zip

Step 2: Open AndroidStudio and Choose menu File > and select Import Settings... from the menu.

Step 3: Specify live template configuration path by selection Live_templates_android.zip file.

Step 4: Now select the Live templates checkbox and click OK.

Step 5: After restarting AndroidStudio you will get the all templates at Live Templates by navigating File > Settings > Editor > Live Templates

📖 Example:

We have added templates in individual templates group like AndroidManifest, AndroidXmlLayoutTemplates, AndroidGradle, AndroidXmlMenu etc.

1. AndroidXmlLayoutTemplates

Template Name Purpose Properties
center_parent Set view in the center of parent in the ConstraintLayout app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
center_vertical Set vertical constraint on view app:layout_constraintTop_toTopOf="@+id/VIEW_ID" app:layout_constraintBottom_toBottomOf="@+id/VIEW_ID"
center_vertical_parent Set vertical constraint on view with parent app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
center_horizontal Set horizontal constraint on view app:layout_constraintStart_toStartOf="@+id/VIEW_ID" app:layout_constraintEnd_toEndOf="@+id/VIEW_ID"
center_horizontal_parent Set horizontal constraint on view with parent app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"

For more templates checkout AndroidXmlLayoutTemplates in wiki.

2. AndroidManifest

Template Name Purpose Properties
permission_storage Add read/write permissioin for external storage < uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> < uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
permission_location Add location permissioins in manifest < uses-permissions android:name="android.permission.ACCESS_COARSE_LOCATION"/> < uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

For more templates checkout AndroidManifest in wiki.

3. AndroidGradle

Template Name Purpose Properties
buildTypes Default buildTypes setup in gradle with release and debug buildTypes { release { minifyEnabled false ...} debug { minifyEnabled false ...} }

For more templates checkout AndroidGradle in wiki.

Screenshots

Center in parent
Screenshots

Android menu setup
Screenshots

Gradle build config setup
Screenshots

➕ Adding more templates!

we are Welcoming PR!

Step 1: Add new template(s) in your android studio aftert importing latest Live_templates_android.zip

Step 2: Export the setting with only "Live Templates" section. File -> Exports Settings -> Click on Select None to deselect other settings. -> Select Live Templates(schemes)

Exports Settings

Step 3: Upload latest settings file with new branch and Send PR.

Check out contribution guidelines CONTRIBUTING.md

🎥 Videos guide

Blog

Checkout AndroidLiveTemplate blog post HERE by Jovche Mitrejchevski

Built With

✉️ Get in touch!

Find this project useful ? ❤️

Support it by clicking the ⭐️ button on the upper right of this page. ✌️

License

   Copyright © 2019 Pranay Patel

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

About

🚀 A curated android templates to make android development more easy and fast 🔋 !

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published