Browse Source

1:修改BaseApplication类;

guiying712 8 years ago
parent
commit
37ea9ccd58

+ 22 - 0
lib_common/src/main/java/com/guiying/module/common/base/BaseApplication.java

@@ -41,8 +41,30 @@ public class BaseApplication extends Application {
         for (ApplicationDelegate delegate : mAppDelegateList) {
         for (ApplicationDelegate delegate : mAppDelegateList) {
             delegate.onCreate();
             delegate.onCreate();
         }
         }
+    }
 
 
+    @Override
+    public void onTerminate() {
+        super.onTerminate();
+        for (ApplicationDelegate delegate : mAppDelegateList) {
+            delegate.onTerminate();
+        }
     }
     }
 
 
 
 
+    @Override
+    public void onLowMemory() {
+        super.onLowMemory();
+        for (ApplicationDelegate delegate : mAppDelegateList) {
+            delegate.onLowMemory();
+        }
+    }
+
+    @Override
+    public void onTrimMemory(int level) {
+        super.onTrimMemory(level);
+        for (ApplicationDelegate delegate : mAppDelegateList) {
+            delegate.onTrimMemory(level);
+        }
+    }
 }
 }

+ 1 - 1
module_main/src/main/java/com/guiying/module/main/BottomNavigationActivity.java

@@ -39,7 +39,7 @@ public class BottomNavigationActivity extends BaseActivity {
                 mPager.setCurrentItem(1);
                 mPager.setCurrentItem(1);
                 return true;
                 return true;
             } else if (i == R.id.navigation_notifications) {
             } else if (i == R.id.navigation_notifications) {
-                mPager.setCurrentItem(2);
+                mPager.setCurrentItem(0);
                 return true;
                 return true;
             }
             }
             return false;
             return false;