Augustmae
Augustmae

Reputation: 89

Add unimplemented methods in android studio

I'm trying to implement onCreateOptionsMenu but I can't figure how to implement methods, the CTRL+ I shortcut does not work. Does android studio have the override/unimplemented methods option?

Upvotes: 5

Views: 8516

Answers (3)

Sunshine
Sunshine

Reputation: 387

  1. To override abstract methods in android studio use Ctrl+ I.

2.To check all the methods available in super class use Ctrl+ O.

Upvotes: 8

Adrien Cadet
Adrien Cadet

Reputation: 1341

If you have abstract methods to implement, press Alt+Enter over class name to open a wizard.

Otherwise, for overriding a function, just start typing the name of your method (without any access attribute or type), anywhere in your class scope. Then, Android Studio should suggest you overridable methods.

Upvotes: 1

Bastian Kas
Bastian Kas

Reputation: 144

Yes. Go to where you declared the class and right click on what ever you are extending or implementing. A menu with the "Generate..." option shall appear and a sub-menu with what you are looking for will drop down from there.

Upvotes: 13

Related Questions