Browse Source

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.

iwgeric 10 years ago
parent
commit
149eff6de9
1 changed files with 12 additions and 0 deletions
  1. 12 0
      jme3-android/src/com/jme3/gde/android/AndroidImportantFiles.java

+ 12 - 0
jme3-android/src/com/jme3/gde/android/AndroidImportantFiles.java

@@ -67,6 +67,18 @@ public class AndroidImportantFiles implements ImportantFiles {
                 node.setDisplayName("Android Properties");
                 node.setDisplayName("Android Properties");
                 list.add(node);
                 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) {
         } catch (DataObjectNotFoundException ex) {
             Exceptions.printStackTrace(ex);
             Exceptions.printStackTrace(ex);
         }
         }