|
@@ -1,8 +1,10 @@
|
|
package com.wdkl.callingbed2.base;
|
|
package com.wdkl.callingbed2.base;
|
|
|
|
|
|
|
|
+import android.app.StatusBarManager;
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
import android.support.annotation.Nullable;
|
|
import android.support.annotation.Nullable;
|
|
|
|
+import android.util.Log;
|
|
import android.view.View;
|
|
import android.view.View;
|
|
import android.view.Window;
|
|
import android.view.Window;
|
|
import android.view.WindowManager;
|
|
import android.view.WindowManager;
|
|
@@ -15,6 +17,8 @@ import com.zhy.autolayout.AutoLayoutActivity;
|
|
|
|
|
|
import org.greenrobot.eventbus.EventBus;
|
|
import org.greenrobot.eventbus.EventBus;
|
|
|
|
|
|
|
|
+import java.lang.reflect.Method;
|
|
|
|
+
|
|
import butterknife.ButterKnife;
|
|
import butterknife.ButterKnife;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -52,6 +56,19 @@ public abstract class BaseActivity<T extends BasePresenterI, V> extends AutoLayo
|
|
initData();
|
|
initData();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ protected void disableStatusBar() {
|
|
|
|
+ Object service = getSystemService("statusbar");
|
|
|
|
+ try {
|
|
|
|
+ Class<?> statusBarManager = Class.forName
|
|
|
|
+ ("android.app.StatusBarManager");
|
|
|
|
+ Method expand = statusBarManager.getMethod("disable", int.class);
|
|
|
|
+ expand.invoke(service, StatusBarManager.DISABLE_EXPAND);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ //unBanStatusBar();
|
|
|
|
+ //e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* Base基本类
|
|
* Base基本类
|