IDE (Android Studio) 활용 #1

ladmusician.kim
Jul 21, 2017 · 2 min read
  • File template
  • Live template

File template

Android Studio에서는 java class 생성시 ‘Create New CLass’ Dialog를 통해 어떻게 java class와 types들이 어떻게 생성되는지 정보를 입력할 수 있다.

Android Studio 2.1.x or lower had Name and Kind fields

Android Studio 2.2와 더 높은 버전에서는 위 사진처럼 다양한 정보를 입력할 수 있는데 Kind에 해당하는 class type을 customizing하여 반복되는 작업들을 줄일 수 있다.

Android Studio file template은 VTL(Velocity Template Language)로 작성되어 VTL을 통해 다양하게 변형이 가능하다.

Preference > File and Code Template

BaseActivity를 만들어 activity를 생성할 때 항상 상속을 받는 구조나 MVP pattern에서 Contract class를 만들어 상속하는 구조 그리고 recycler를 사용하는 view를 생성할 때 반복적으로 해주는 작업들을 구현해놓으면 귀찮은 반복되는 작업들을 피할 수 있다.

Live template

)
ladmusician.kim

Written by

https://chulbuji.gq

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade