Eclipse 默认打开Android xml 布局视图的问题

有时候,我们在导入工程的时候,会发现XML的视图不是layout布局视图,如下图所示:
Eclipse 默认打开Android xml 布局视图的问题
简单的方式是右键该xml文件,open with --> android layout editor
不过总不能每个布局都这么设置过去吧

解决方法:

Window -> Preferences -> General -> Editors -> File Associations

File types:选择 *.xml ,如下图所示:
Eclipse 默认打开Android xml 布局视图的问题

Associated editors:选择Android Layout Editor(default) -> Default

点击OK大功告成。。。