[6.6.0]
[fea] [登录页面添加statusbar]
This commit is contained in:
@@ -15,12 +15,14 @@ import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.biz.BuildConfig
|
||||
import com.mogo.och.biz.R
|
||||
import com.mogo.och.biz.login.callback.ILoginViewCallback
|
||||
import com.mogo.och.biz.login.presenter.LoginPresenter
|
||||
import kotlinx.android.synthetic.main.biz_login_view.bg_start_bar
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_acbtn_login
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_ace_login_phone_value
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_acet_phone_code_value
|
||||
@@ -77,7 +79,11 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
}
|
||||
|
||||
private fun initBg() {
|
||||
|
||||
bg_start_bar.post {
|
||||
val params: ViewGroup.LayoutParams = bg_start_bar.getLayoutParams()
|
||||
params.height = BarUtils.getStatusBarHeight()
|
||||
bg_start_bar.layoutParams = params
|
||||
}
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
|
||||
@@ -23,6 +23,13 @@
|
||||
android:layout_width="1071dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/bg_start_bar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:background="@color/biz_login_171D2B"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_72"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/biz_actv_welcome_login_title"
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
<color name="biz_login_5F6582">#5F6582</color>
|
||||
<color name="biz_login_72A7FF">#72A7FF</color>
|
||||
<color name="biz_login_A0B3DA">#A0B3DA</color>
|
||||
<color name="biz_login_171D2B">#171D2B</color>
|
||||
|
||||
</resources>
|
||||
@@ -58,13 +58,12 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
|
||||
|
||||
private fun showFragment() {
|
||||
val supportFragmentManager: FragmentManager? = activity?.supportFragmentManager
|
||||
injectStatusBar()
|
||||
val fragment = if (LoginStatusManager.isLogin()) {
|
||||
val fragment = getFragment()
|
||||
injectStatusBar()
|
||||
LoginStatusManager.resetFragment()
|
||||
fragment
|
||||
} else {
|
||||
removeStatusBar()
|
||||
CallerHmiManager.hideToolsView()
|
||||
ToggleDebugView.toggleDebugView.dismiss()
|
||||
SopView.sopView.dismiss()
|
||||
@@ -200,8 +199,8 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
|
||||
}
|
||||
|
||||
override fun onBusinessChangeDebug(businessEnum: BusinessEnum) {
|
||||
injectStatusBar()
|
||||
if (businessEnum == BusinessEnum.None) {
|
||||
removeStatusBar()
|
||||
CallerHmiManager.hideToolsView()
|
||||
ToggleDebugView.toggleDebugView.dismiss()
|
||||
SopView.sopView.dismiss()
|
||||
@@ -217,7 +216,6 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
|
||||
onBusinessChange(businessEnum)
|
||||
val supportFragmentManager: FragmentManager? = activity?.supportFragmentManager
|
||||
val fragment = getFragment()
|
||||
injectStatusBar()
|
||||
d(TAG, "切换 fragment:${fragment}")
|
||||
LoginStatusManager.resetFragment()
|
||||
if (supportFragmentManager != null) {
|
||||
@@ -237,6 +235,9 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
|
||||
contentView.fitsSystemWindows = false
|
||||
decorView.clipToPadding = false
|
||||
var statusBarView = decorView.findViewWithTag<View>("status_bar")
|
||||
if(statusBarView!=null){
|
||||
return
|
||||
}
|
||||
val statusBar = commonService?.getStatusBarView(it)
|
||||
statusBarView = statusBar ?: StatusBarView(it)
|
||||
statusBarView.tag = "status_bar"
|
||||
|
||||
Reference in New Issue
Block a user