|
@@ -6,6 +6,7 @@ import android.databinding.DataBindingUtil
|
|
import android.databinding.ViewDataBinding
|
|
import android.databinding.ViewDataBinding
|
|
import android.os.Bundle
|
|
import android.os.Bundle
|
|
import android.view.View
|
|
import android.view.View
|
|
|
|
+import android.view.WindowManager
|
|
import android.view.inputmethod.InputMethodManager
|
|
import android.view.inputmethod.InputMethodManager
|
|
import com.enation.javashop.android.jrouter.JRouter
|
|
import com.enation.javashop.android.jrouter.JRouter
|
|
import com.wdkl.ncs.android.lib.R
|
|
import com.wdkl.ncs.android.lib.R
|
|
@@ -56,6 +57,13 @@ abstract class BaseActivity<PresenterType : BaseContract.BasePresenter, DataBind
|
|
*/
|
|
*/
|
|
protected val disposableManager by lazy { DisposableManager() }
|
|
protected val disposableManager by lazy { DisposableManager() }
|
|
|
|
|
|
|
|
+ private val FULL_SCREEN_FLAG = (
|
|
|
|
+ View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
|
|
|
+ or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
|
|
|
+ or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
|
|
|
+ or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
|
|
|
+ or View.SYSTEM_UI_FLAG_FULLSCREEN)
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @author LDD
|
|
* @author LDD
|
|
* @From com.wdkl.ncs.android.lib.base.BaseActivity
|
|
* @From com.wdkl.ncs.android.lib.base.BaseActivity
|
|
@@ -70,6 +78,12 @@ abstract class BaseActivity<PresenterType : BaseContract.BasePresenter, DataBind
|
|
}
|
|
}
|
|
/**父类初始化*/
|
|
/**父类初始化*/
|
|
super.onCreate(savedInstanceState)
|
|
super.onCreate(savedInstanceState)
|
|
|
|
+
|
|
|
|
+ window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN or
|
|
|
|
+ WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON or
|
|
|
|
+ WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or
|
|
|
|
+ WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON)
|
|
|
|
+
|
|
/**执行生命周期监听*/
|
|
/**执行生命周期监听*/
|
|
lifeCycleDo(LIFE_CYCLE_CREATE)
|
|
lifeCycleDo(LIFE_CYCLE_CREATE)
|
|
/**创建根视图*/
|
|
/**创建根视图*/
|
|
@@ -78,6 +92,10 @@ abstract class BaseActivity<PresenterType : BaseContract.BasePresenter, DataBind
|
|
mViewBinding = DataBindingUtil.bind(rootView)
|
|
mViewBinding = DataBindingUtil.bind(rootView)
|
|
/**设置根视图到Activity*/
|
|
/**设置根视图到Activity*/
|
|
setContentView(rootView)
|
|
setContentView(rootView)
|
|
|
|
+
|
|
|
|
+ //解决全屏显示时弹出界面会跳一下的问题
|
|
|
|
+ window.decorView.systemUiVisibility = FULL_SCREEN_FLAG
|
|
|
|
+
|
|
/**执行抽象方法初始化Dagger相应操作*/
|
|
/**执行抽象方法初始化Dagger相应操作*/
|
|
bindDagger()
|
|
bindDagger()
|
|
/**Presenter绑定View*/
|
|
/**Presenter绑定View*/
|