瀏覽代碼

changed views order

tags/0.0.6
Robin Thoni 9 年之前
父節點
當前提交
e073ef0a75

+ 6
- 6
app/src/main/java/com/rthoni/camotion/ui/MainActivity.java 查看文件

@@ -156,14 +156,14 @@ public class MainActivity extends AppCompatActivity
156 156
             {
157 157
                 return R.id.nav_cameras;
158 158
             }
159
-            else if (_fullLoginDbo.hasPermission("CAMOTION_SENSOR_GET"))
160
-            {
161
-                return R.id.nav_sensors;
162
-            }
163 159
             else if (_fullLoginDbo.hasPermission("CAMOTION_COMMAND_GET"))
164 160
             {
165 161
                 return R.id.nav_commands;
166 162
             }
163
+            else if (_fullLoginDbo.hasPermission("CAMOTION_SENSOR_GET"))
164
+            {
165
+                return R.id.nav_sensors;
166
+            }
167 167
         }
168 168
         return -1;
169 169
     }
@@ -173,10 +173,10 @@ public class MainActivity extends AppCompatActivity
173 173
         CamotionFragment fragment;
174 174
         if (view == R.id.nav_cameras) {
175 175
             fragment = new CamerasFragment();
176
-        } else if (view == R.id.nav_sensors) {
177
-            fragment = new SensorsFragment();
178 176
         } else if (view == R.id.nav_commands) {
179 177
             fragment = new CommandsFragment();
178
+        } else if (view == R.id.nav_sensors) {
179
+            fragment = new SensorsFragment();
180 180
         } /*else if (view == -1) {
181 181
             fragment = new DefaultFragment();
182 182
         } */else {

+ 4
- 4
app/src/main/res/menu/activity_main_drawer.xml 查看文件

@@ -6,14 +6,14 @@
6 6
             android:id="@+id/nav_cameras"
7 7
             android:icon="@mipmap/ic_camera"
8 8
             android:title="@string/camera" />
9
-        <item
10
-            android:id="@+id/nav_sensors"
11
-            android:icon="@mipmap/ic_sensor"
12
-            android:title="@string/sensors" />
13 9
         <item
14 10
             android:id="@+id/nav_commands"
15 11
             android:icon="@mipmap/ic_command"
16 12
             android:title="@string/commands" />
13
+        <item
14
+            android:id="@+id/nav_sensors"
15
+            android:icon="@mipmap/ic_sensor"
16
+            android:title="@string/sensors" />
17 17
     </group>
18 18
 
19 19
     <item android:title="@string/locations"

Loading…
取消
儲存