Android Studio快捷键(Windows/Linux/macOS)

Android Studio快捷键(Windows/Linux/macOS)请添加图片描述

一、编辑类

复制类名及方法名的具体位置

<Ctrl + Alt + Shift + C>(Windows/Linux)
<Alt + command + Shift + C>(macOS)

合并两行代码

<Ctrl + Shift + J>(Windows/Linux)
<control + Shift + j>(macOS)

自动补全当前代码

<Ctrl + Shift + Enter>(Windows/Linux)
<Shift +command + Enter >(macOS)

切换字母大小写

<Ctrl + Shift + U>(Windows/Linux)
<Shift + command + U>(macOS)

查找工具栏

<Ctrl + F> (Windows/Linux)
command + F(macOS)
打开查找路径的窗口
Ctrl + Shift + F(Windows/Linux)
hift + command + F(macOS)

替换

<Ctrl + R>(Windows/Linux)
<command + R>(macOS)
打开替换路径的窗口
Ctrl + Shift + R(Windows/Linux)
command + shift + R(macOS)

查找使用位置

Alt + F7(Windows/Linux)
fn + option + F7(macOS)

标注关键词位置

Ctrl + Shift + F7(Windows/Linux)
<fn + shift + command + F7>(macOS)

二、编辑类

显示与隐藏工具窗口

在这里插入图片描述

快速查看帮助文档

Ctrl + Q(Windows/Linux)
fn + F1(macOS)

快速查看方法参数信息

Ctrl + P(Windows/Linux)
<command + P>(macOS)

扫描二维码关注公众号,回复: 15514798 查看本文章

查看源码信息

F4(Windows/Linux)
command + ↓(macOS)
按住Ctrl + 鼠标左键单击对应的方法或者是类

三、编码类

重写父类的方法

Ctrl + O(Windows/Linux)
control + O(macOS)

实现接口中的方法

<Ctrl + I>(Windows/Linux)
<control + L>(macOS)

生成构造方法

Alt + Insert 选Constructor(Windows/Linux)
command + N 选择Constructor 选项(macOS)

生成Getter 和Setter 方法

Alt + Insert 选择Getter and Setter(Windows/Linux)
command + N 选择Getter and Setter 选项(macOS)

注释代码

Ctrl + /(Windows/Linux)
command+/(macOS)

注释代码块

Ctrl + Shift + /(Windows/Linux)
option + command + /(macOS)

格式化代码

Ctrl + Alt + L(Windows/Linux)
option + command+ L(macOS)

猜你喜欢

转载自blog.csdn.net/Qingshan_z/article/details/126649586