OSDN Git Service

[CMFileManager] Fix the DrawerLayout don't disapper after press back key.
authorkai.cao <kai.cao@ck-telecom.com>
Tue, 21 Apr 2015 07:01:59 +0000 (15:01 +0800)
committerkai.cao <kai.cao@ck-telecom.com>
Tue, 21 Apr 2015 07:01:59 +0000 (15:01 +0800)
Procedures
1.Go into filemanager and enter a directory(such as Music).
2.Open the menu Button in the top left corner and popup the drawerlayout.
3.press the back key.

The DrawerLayout don't disapper and the navigation view back to the next higher level.

Change-Id: I13c78491e2be767e7611d57c2c513013d96465eb

src/com/cyanogenmod/filemanager/activities/NavigationActivity.java

index 84790cb..16e358b 100755 (executable)
@@ -1741,6 +1741,10 @@ public class NavigationActivity extends Activity
 
     @Override
     public void onBackPressed() {
+        if (mDrawerLayout.isDrawerOpen(Gravity.START)) {
+            mDrawerLayout.closeDrawer(Gravity.START);
+            return;
+        }
         if (checkBackAction()) {
             performHideEasyMode();
             return;