android tutorial - Custom Live Template in Android Studio | Developer android - android app development - android studio - android app developement



Custom Live Template

Example :

 learn android - android tutorial -   android testing - mobile app developement - android code - android programming - android download - android examples

Learn Android - Android tutorial - learn android - android tutorial - android testing - mobile app developement - android code - android programming - android download - android examples - Android examples - Android programs

To achieve this purpose , you should add a custom Live Template:

  • Open Settings [Ctrl + Alt + S ]
  • Type "Live Templates" in the Top-Left search bar.
  • Click the + to add a "Template Group" and type a group name(eg: MyTemplate) to continue
 learn android - android tutorial -   android testing - mobile app developement - android code - android programming - android download - android examples

Learn Android - Android tutorial - learn android - android tutorial - android testing - mobile app developement - android code - android programming - android download - android examples - Android examples - Android programs

  • Choose your custom template group(eg: MyTemplate), then click + and choose "Live Template".
  • I will take "say" for example:
say -> startActivity(new Intent($from$.this,$to$.class));
  • Type the key that you want to simplify in "Abbreviation" (eg: say),and type the statement in the "Template Text" (eg :startActivity(new Intent($from$.this,$to$.class));)
 learn android - android tutorial -   android testing - mobile app developement - android code - android programming - android download - android examples

Learn Android - Android tutorial - learn android - android tutorial - android testing - mobile app developement - android code - android programming - android download - android examples - Android examples - Android programs

  • Click the "define" in the Left-Bottom and choose the situation(eg: Java)
  • Click the "Edit variables",define the expression.(see detail:Edit Template Variables Dialog)
 learn android - android tutorial -   android testing - mobile app developement - android code - android programming - android download - android examples

Learn Android - Android tutorial - learn android - android tutorial - android testing - mobile app developement - android code - android programming - android download - android examples - Android examples - Android programs

  • Click "OK" and "Apply". And try to type "say" in your editor.

Related Searches to Custom Live Template in Android Studio