Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ import androidx.core.view.WindowInsetsControllerCompat
import kotlin.math.abs
import kotlin.math.ceil


object SystemUiUtils {
private const val STATUS_BAR_HEIGHT_M = 24
internal const val STATUS_BAR_HEIGHT_TRANSLUCENCY = 0.65f
private var statusBarHeight = -1
var navigationBarDefaultColor = -1
private set


@JvmStatic
fun getStatusBarHeight(activity: Activity?): Int {
val res = if (statusBarHeight > 0) {
Expand Down Expand Up @@ -167,4 +165,4 @@ object SystemUiUtils {
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ class StatusBarPresenter private constructor(

private fun setStatusBarVisible(viewController: ViewController<*>, visible: Bool) {
val window = window.get() ?: return
val view = if (viewController.view != null) viewController.view else window.decorView
val view = viewController.peekView() ?: window.decorView

if (visible.isFalse) {
hideStatusBar(window, view)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ public void attachView(ViewGroup parent, int index) {
if (view.getParent() == null) parent.addView(view, index);
}

@Nullable
public T peekView() {
return view;
}

public String getId() {
return id;
}
Expand Down
Loading