Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to jump to class or method implementation in Android Studio

With Eclipse I would just hover over class or method name and CTRL+? to jump to the implementation. Even if it was an import I was interested in I could jump to the implementation.

In Android Studio, how is this done for methods and classes?

I don't think CTRL+Alt+7 is what I want. I want to go to where the code is written for the type or method defined that the cursor is hovering over or selected.

I've got lots of code to review so I would appreciate an answer for this.

I'm on a PC but I would like to know for Mac as well.

like image 555
FunctionallyReactive Avatar asked Jan 26 '16 09:01

FunctionallyReactive


People also ask

Where is the method in Android Studio?

Here's where Android Studio comes to the rescue. Just press CTRL+Space on Windows or Command+Space on Mac and you will be presented with a popup of all the variants of a method and the arguments that it expects.

How do I redo in Android Studio?

It is simple and default: ( CTRL + Z ) This is for undo. Just press ( CTRL + SHIFT + Z ) for redo.

What is method Android studio?

A Method provides information about, and access to, a single method on a class or interface. The reflected method may be a class method or an instance method (including an abstract method).

What is model class in Android Studio?

ViewModel overview Part of Android Jetpack. The ViewModel class is designed to store and manage UI-related data in a lifecycle conscious way. The ViewModel class allows data to survive configuration changes such as screen rotations.


2 Answers

To jump to the implementation - Go with CTRL + YourMethodname OR Scroll-click on method as in Eclipes

Following are used in Android Studio

Add unimplemented methods: CTRL + I

Override methods: CTRL + O

Format code: CTRL + ALT + L

Show project: ALT + 1

Show logcat: ALT + 6

Build: CTRL + F9

Build and Run: CTRL + F10

Expand all: CTRL + SHIFT + NumPad -

Find and replace: CTRL + R

Find: CTRL + F

You can change shortcuts by following below :-

This section lists Android Studio keyboard shortcuts for the default keymap. To change the default keymap on Windows and Linux, go to File > Settings > Keymap. If you're using Mac OS X, update your keymap to use the Mac OS X 10.5+ version keymaps under Android Studio Preferences > Keymap.

Here is Official documentation for Android studio tips and shortcuts

For Mac: Android Studio Shortcuts for Mac OS

like image 146
Amit Vaghela Avatar answered Sep 18 '22 18:09

Amit Vaghela


CTRL+Click (=left mouse key) should work, just as in Eclipse!

like image 38
winne2 Avatar answered Sep 20 '22 18:09

winne2