The B
The B

Reputation: 545

Implement methods

I was wondering if there is a way to implement a method in "Android Studio" at the begin of creating a class such as in Eclipse. When you create a class in Eclipse you have the option to add an superclass when you create a class, however, in AS you can only name the class and you have to put the methods manually by writing for instance "extends BroadcastReceiver" and then press ctrl+i to get the method list.

My question is if there is a auto-generator for superclass/methods in Android Studio or not?

Upvotes: 3

Views: 674

Answers (2)

kemitche
kemitche

Reputation: 801

After you create the class, you can hit alt-enter when selecting the class name - it should bring up the option to implement all the missing methods at once.

Upvotes: 0

Stephan Branczyk
Stephan Branczyk

Reputation: 9375

ctrl-i also implements methods of the super class in Android Studio/IntelliJ

Here is a pdf you can download with all the shortcuts for IntelliJ. This document is very handy to print out and keep posted next to your workstation. ctrl-i is on the left column on the 12th row. enter image description here

Upvotes: 1

Related Questions