Android Studio 中的代码补全 [英] Code completion to in Android Studio

查看:41
本文介绍了Android Studio 中的代码补全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个关于编辑器的问题,我不知道如何简要表达这个问题,所以我找不到答案

A question about the editor, I am not sure how to briefly phrase the question so I could not find an answer

我刚刚从 Eclipse 转移到 Mac 上的 Android Studio.

I have just moved from Eclipse to Android Studio on the Mac.

如果在布局文件中,我开始输入 android:au,假设我想选择自动文本查看屏幕截图

If in a layout file, I start typing android:au, assuming I want to choose autotext see screenshot

我怎样才能完成到auto"的to".所以我只需要输入 T 然后输入选择自动图文集.

How can I get the completion to go upto the "to" of "auto". So that I just have to type the T and then enter to choose autoText.

因为没有没有to"的选项,我应该被允许选择它.

Since there are no options without the "to" I should be allowed to select it.

如果我的解释不够清楚,请告诉我

Please let me know if my explanation is not clear enough

推荐答案

默认情况下,Intellij (Studio) 会解析整个文本以搜索您的输入字符.如果您输入文本",它会默认在选项中显示自动文本".您无需为此行为配置任何内容.

Intellij (Studio) parses the whole text to search for your input characters by default. If you type "Text", it should show "autoText" in the options by default. You don't have to configure anything for this behavior.

不过它会优先考虑完全匹配,因此如果您输入带有大写 T"Text",您更有可能得到正确的结果而不是输入 "text" 并带有一个小 t.

It will give preference to exact matches though, so if you type in "Text" with a capital T, you're more likely to get the correct result than typing "text" with a small t.

您可以在以下位置更改这些首选项:

You can change these preferences in:

Settings(or Preferences in mac)->Editor->Code Completion

这篇关于Android Studio 中的代码补全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆