Android Studio : Implement abstract methods shortcut

Posted on : Thu, 23rd Apr 15 12:08 pm UTC
100+ votes

You might have mapped Android Studio keyboard shortcuts with that of Eclipse IDE thats lets you import packages using Ctrl + Shift + O (Command + Shift + O for Mac OS X) but when you are implement a class with abstract methods the key combinations does not work, for this you have to,

  1. Place your cursor over the implemented class name and press Alt + Enter ( Option + Enter on Mac OS X)
  2. You would now see a Red color bulb.

    Fig : Implementing abstract methods (see the red bulb)

  3. Click on the bulb and select Implement methods.

  4. Thats it! you would get the abstract methods added with @Override annotations.

Code2care's mission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel. Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.

Follow us : Facebook - Twitter - Google +