Android Studio shortcuts like Eclipse

前端 未结 20 1130
后悔当初
后悔当初 2020-12-04 05:19

I am new to Android Studio and want to know about shortcuts. In Eclipse we use shift-ctrl-O for importing. In Android Studio we use alt-enter. My ques

相关标签:
20条回答
  • 2020-12-04 06:19

    You can use Eclipse Short-cut key in Android Studio too.

    File -> Settings -> Keymap -> <Choose Eclipse from Keymaps dropdown> 
    

    For Mac OS :

    File -> Preferences or Properties -> Keymap -> <Choose Eclipse from Keymaps dropdown> 
    
    0 讨论(0)
  • 2020-12-04 06:19

    you can not remember all shortcuts :)
    android studio(actually intellij) has a solution

    quick command search : ctrl+shift+A

    enter image description here

    0 讨论(0)
  • 2020-12-04 06:19

    Search

    • All - Search Everywhere

      Double ⌃ Shift

    • Classes - Find class:

      Mac: ⌘ Command + O
      Windows/Linux: Ctrl + N

    • Files - Find file:

      Mac: ⌘ Command + ⌃ Shift + O
      Windows/Linux: Ctrl + Shift + N

    • Symbols - Search by symbol name:

      Mac: ⌘ Command + ⌥ Option + O
      Windows/Linux: Ctrl + Alt + Shift + N

    • Action - Find action:

      Mac: ⌘ Command + ⌃ Shift + A
      Windows/Linux: Ctrl + Shift + A

    0 讨论(0)
  • 2020-12-04 06:20

    Yes you can go to File -> Settings -> Editor -> Auto Import -> Java and make the following changes:

    1.change Insert imports on paste value to All in drop down option.

    2.markAdd unambigious imports on the fly option as checked.(For Window or linux user)

    On a Mac, do the same thing in Android Studio -> Preferences

    3.You can also use Eclipse shortcut key in Android Studio just go to in Android Studio

    File -> Settings -> KeyMap -> Keymaps dropdown Option. Select from them

    Thankyou

    0 讨论(0)
  • 2020-12-04 06:21

    You can change your keymap to use eclipse shortcuts. You can see here how to change keymap. https://stackoverflow.com/a/25419358

    0 讨论(0)
  • 2020-12-04 06:22

    Important Android Studio Shortcuts You Need the Most


    Navigation Shortcuts

    • Go to class : CTRL + N

    • Go to file : CTRL + SHIFT + N

    • Navigate open tabs : ALT + Left-Arrow; ALT + Right-Arrow

    • Lookup recent files : CTRL + E

    • Go to line : CTRL + G

    • Navigate to last edit location : CTRL + SHIFT + BACKSPACE

    • Go to declaration : CTRL + B

    • Go to implementation : CTRL + ALT + B

    • Go to source : F4

    • Go to super Class : CTRL + U

    • Show Call hierarchy : CTRL + ALT + H

    • Search in path/project : CTRL + SHIFT + F


    Programming Shortcuts

    • Reformat code : CTRL + ALT + L

    • Optimize imports : CTRL + ALT + O

    • Code Completion : CTRL + SPACE

    • Issue quick fix : ALT + ENTER

    • Surround code block : CTRL + ALT + T

    • Rename and refactor : SHIFT + F6

    • Line Comment or Uncomment : CTRL + /

    • Block Comment or Uncomment : CTRL + SHIFT + /

    • Go to previous/next method : ALT + UP/DOWN

    • Show parameters for method : CTRL + P

    • Quick documentation lookup : CTRL + Q


    General Shortcuts

    • Delete line : CTRL + Y

    • Safe Delete : ALT + DELETE

    • Close Active Tab : CTRL + F4

    • Build and run : SHIFT + F10

    • Build : CTRL + F9

    • All purpose (Meta)Shortcut : CTRL + SHIFT + A

    0 讨论(0)
提交回复
热议问题