[状态栏]状态栏位置上移

This commit is contained in:
renwj
2022-07-29 12:09:19 +08:00
parent 88bc7eb684
commit 209423dbcd
12 changed files with 115 additions and 89 deletions

View File

@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.call.devatools
import android.app.Activity
import android.content.Context
import android.view.View
import android.view.*
import com.mogo.eagle.core.data.config.*
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
@@ -150,9 +150,18 @@ object CallerDevaToolsManager {
/**
* 展示状态栏
*/
fun showStatusBar(ctx: Context) {
fun showStatusBar(ctx: Context, anchor: View) {
if (!AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
devaToolsProviderApi?.showStatusBar(ctx)
if (anchor.isLaidOut) {
devaToolsProviderApi?.showStatusBar(ctx, anchor)
} else {
anchor.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
override fun onGlobalLayout() {
devaToolsProviderApi?.showStatusBar(ctx, anchor)
anchor.viewTreeObserver.removeOnGlobalLayoutListener(this)
}
})
}
}
}