I am only getting autocomplete in my xml layout when i type "android:" I want to get it whenever I press cmd+space. I am using a mac
-
Isn't cmd+space is for spotlight. Did you try CTRL+space? – Sohaib Feb 24 '14 at 10:04
-
I disabled the spotlight and configured cmd+space...its working when I type "android:".... – user1163234 Feb 24 '14 at 10:14
5 Answers
Go to
Eclipse -> Preferences -> XML -> XML Files - > Editor -> Content Assist
and tick all proposals
checkboxes to allow this.
EDIT : Also tick Automatically make suggestions
and Insert single proposals automatically
checkboxes.

- 4,231
- 2
- 20
- 35
-
I can find that " all proposals to allow this". I added screenshot of prefrences – user1163234 Feb 24 '14 at 10:20
-
Am I missing anything from my screenshot? Am I on the correct page? – user1163234 Feb 24 '14 at 10:24
Open Preferences and in the search type XML, you would find on the left pane a XML hierarchy and under editor you will have content assist. Just tick all the boxes there are in this page and you are good to go!

- 1,689
- 4
- 22
- 46
-
-
Sometime assist stops working for me, sorry but restarting eclipse has fixed it. Done that ? – Aadi Droid Feb 24 '14 at 11:00
Window--->Preferences----->General------->Keys, find Content Assist and set attribute Binding as cmd + space, and attribute When as Editing in Structured Text Editors, if it still not work, right click on your xml file, choose open with, try to use Android Menu Editor. Good luck.

- 14,302
- 7
- 27
- 44
-
doesnt work..tried to open with Android Menu Editor but I didnt see it open with "Andorid common XML Editor" – user1163234 Feb 24 '14 at 13:05
I found the solution: I needed to unselect in my mac SystemPref --> keyboard-->shortcuts there was a command "select the previous input source"

- 2,407
- 6
- 35
- 63
All You want is code promption whatever you enter.
Eclipse -> Preferences -> XML -> XML Files - > Editor -> Content Assist
Then input "prompt when these characters are inserted" with
@+<=:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

- 280
- 3
- 8