Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 934
Augustmae Avatar asked Jan 25 '15 04:01

Augustmae


3 Answers

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.

like image 131
Bastian Kas Avatar answered Nov 17 '22 17:11

Bastian Kas


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

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

like image 35
Sunshine Avatar answered Nov 17 '22 17:11

Sunshine


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.

like image 1
Adrien Cadet Avatar answered Nov 17 '22 16:11

Adrien Cadet