What vim errorformat do you use when running Android's layoutopt tool? (So you can load the results in Vim's quickfix window.)
Sample layoutopt output:
res/layout/main.xml
31:31 Use an android:layout_height of 0dip instead of fill_parent for better performance
I think 31:31 means from line 31 to line 31. So we can ignore the second number (since there's no ranges in quickfix).
Put the following in
~/.vim/after/ftplugin/android-layout.vim
Here's the corresponding makefile (put this in your project root -- so the LAYOUTS path is valid).
Sidenote: You can use this to auto-invoke your ftplugin (instead of making a subtype of the xml filetype):