SDK: Add layout.xml and strings.xml to Important Files node in Android projects.

Useful to quickly modify the layout for the upcoming switch to Android Fragments.
This commit is contained in:
iwgeric 2015-04-02 13:12:08 -04:00
parent 5ab8fb8f6a
commit be6416b736

View File

@ -67,6 +67,18 @@ public class AndroidImportantFiles implements ImportantFiles {
node.setDisplayName("Android Properties");
list.add(node);
}
FileObject layout = project.getProjectDirectory().getFileObject("mobile/res/layout/main.xml");
if (layout != null) {
Node node = DataObject.find(layout).getNodeDelegate();
node.setDisplayName("Android Layout");
list.add(node);
}
FileObject strings = project.getProjectDirectory().getFileObject("mobile/res/values/strings.xml");
if (strings != null) {
Node node = DataObject.find(strings).getNodeDelegate();
node.setDisplayName("Android Strings");
list.add(node);
}
} catch (DataObjectNotFoundException ex) {
Exceptions.printStackTrace(ex);
}