Update
This commit is contained in:
1 parent
525ce72ec1
commit
4133bb4e7b
19 files changed
+368
-57
No files matched your search
@@ -15,11 +15,13 @@
|
||||
|
||||
package com.hippo.ehviewer.ui;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.view.Gravity;
|
||||
|
||||
import com.hippo.content.VectorContext;
|
||||
import com.hippo.ehviewer.R;
|
||||
@@ -62,4 +64,13 @@ public class ContentActivity extends StageActivity {
|
||||
protected void attachBaseContext(Context newBase) {
|
||||
super.attachBaseContext(VectorContext.wrapContext(newBase));
|
||||
}
|
||||
|
||||
@SuppressLint("RtlHardcoded")
|
||||
public void toggleDrawer() {
|
||||
if (mDrawerLayout.isDrawerOpen(Gravity.LEFT) || mDrawerLayout.isDrawerOpen(Gravity.RIGHT)) {
|
||||
mDrawerLayout.closeDrawers();
|
||||
} else {
|
||||
mDrawerLayout.openDrawer(Gravity.LEFT);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user