Auto-complete for import-as statements

With Android Extensions’ synthetic functions, one will end up with long and distracting names for view ids, as each id is prefixed with layout/feature name, to avoid duplicate ids and usage search convenience. However, in the corresponding activity/fragment/view, we usually don’t care about the prefixes as we know where we are and those long names (e.g. “ourLittleSuperCoolLayoutAwesomeNameText”) make the code verbose and distracting and make you split your code lines into two parts (which is a killer in the layouts with many views or when you reference your views several times). One nice solution to remove those prefixes is to use the import-as facility. Unfortunately though, when it comes to code-completion (aka auto-complete) there is an obvious shortage. I haven’t tried other IDEs, but in Android Studio, code-completion doesn’t find the named imports. This is blocker for using the whole Android Extensions.

1 Like