Android Studio not identifying xml file as layout file

Preferences -> File Types and remove the Registered PatternAndroid Studio Preferences


Found the source of the problem - it was in the config files Android Studio creates in your home directory: ~/.AndroidStudioPreview2.0. In my case, it was ~/.AndroidStudioPreview2.0/config/options/filetypes.xml

    <application>
      <component name="FileTypeManager" version="16">
        <ignoreFiles list="*.hprof;*.pyc;*.pyo;*.rbc;*~;.DS_Store;.git;.hg;.svn;CVS;RCS;SCCS;__pycache__;_svn;rcs;" />
        <extensionMap>
          <mapping pattern="drawer_list_item.xml" type="PLAIN_TEXT" />
        </extensionMap>
      </component>
    </application>

Therefore, it seems like I somehow made Android Studio index that file name pattern drawer_list_item.xml as plain text... Removing that mapping entry from the file solves the problem: <mapping pattern="drawer_list_item.xml" type="PLAIN_TEXT" />