Skip to content

Commit

Permalink
BandalartBottomSheet preview 추가
Browse files Browse the repository at this point in the history
preview 를 지원하기 위해 viewModel 이 포함된 composable 과 포함되지 않는 composable 로 분리,
DummyBandalartCellData 추가
  • Loading branch information
easyhooon committed Dec 28, 2023
1 parent 12ea5f9 commit d4a4bde
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 117 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.nexters.bandalart.android.core.ui

import android.app.Activity
import android.graphics.Rect
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.systemBars
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
Expand All @@ -23,19 +20,6 @@ val StatusBarAndActionBarHeightDp
WindowInsets.systemBars.getTop(this).toDp()
}

val StatusBarHeightDp
@Composable
get() = with(LocalContext.current) {
val activity = this as Activity

val rectangle = Rect()
activity.window.decorView.getWindowVisibleDisplayFrame(rectangle)

with(LocalDensity.current) {
rectangle.top.toDp()
}
}

// https://stackoverflow.com/questions/75123079/how-do-i-detect-which-type-of-navigation-bar-is-active
@Composable
fun getNavigationBarPadding(): Dp {
Expand Down
Loading

0 comments on commit d4a4bde

Please sign in to comment.