Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code completion to in Android Studio

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

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

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

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.

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

like image 516
Ryan Heitner Avatar asked Aug 26 '13 10:08

Ryan Heitner


People also ask

How do you do code completion?

Press Ctrl+Alt+S to open the IDE settings and select Editor | General | Code Completion. Under Machine Learning-Assisted Completion, enable the Sort completion suggestions based on machine learning option, and select the languages for which you want to use ML completion.

How do I enable code completion?

Invoke basic completionPress Ctrl+Space or choose Code | Code Completion | Basic from the main menu. If necessary, press Ctrl+Space for the second time (or press Ctrl+Alt+Space ).

Why is auto complete not working in Android Studio?

if the autocomplete isn't working for you in Android Studio, just press File and uncheck the Power save mode, it should work fine after that. if power save mode is already unchecked then first check then uncheck them.

What is IDE code completion?

Intelligent code completion is a context-aware code completion feature in some programming environments that speeds up the process of coding applications by reducing typos and other common mistakes.


1 Answers

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.

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

like image 87
Anup Cowkur Avatar answered Sep 22 '22 02:09

Anup Cowkur