Package com.google.accompanist.insets

Types

ExperimentalAnimatedInsets
Link copied to clipboard
annotation class ExperimentalAnimatedInsets
HorizontalSide
Link copied to clipboard
enum HorizontalSide : Enum<HorizontalSide>
ImeNestedScrollConnection
Link copied to clipboard
class ImeNestedScrollConnection(view: View, scrollImeOffScreenWhenVisible: Boolean, scrollImeOnScreenWhenNotVisible: Boolean) : NestedScrollConnection
A NestedScrollConnection which scrolls the Android on-screen keyboard on/off screen as appropriate, when the user scrolls content.
Insets
Link copied to clipboard
@Stable()
interface Insets
InsetsType
Link copied to clipboard
@Stable()
class InsetsType : Insets
Represents the values for a type of insets, and stores information about the layout insets, animating insets, and visibility of the insets.
VerticalSide
Link copied to clipboard
enum VerticalSide : Enum<VerticalSide>
ViewWindowInsetObserver
Link copied to clipboard
class ViewWindowInsetObserver(view: View)
This class sets up the necessary listeners on the given view to be able to observe WindowInsetsCompat instances dispatched by the system.
WindowInsets
Link copied to clipboard
@Stable()
class WindowInsets
Main holder of our inset values.

Functions

coerceEachDimensionAtLeast
Link copied to clipboard
fun InsetsType.coerceEachDimensionAtLeast(minimumValue: InsetsType): Insets
Ensures that each dimension is not less than corresponding dimension in the specified minimumValue.
imePadding
Link copied to clipboard
fun Modifier.imePadding(): Modifier
Apply additional space which matches the height of the WindowInsets.ime (on-screen keyboard) height along the bottom edge of the content.
navigationBarsHeight
Link copied to clipboard
fun Modifier.navigationBarsHeight(additional: Dp = 0.dp): Modifier
Declare the preferred height of the content to match the height of the navigation bars when present at the bottom of the screen.
navigationBarsPadding
Link copied to clipboard
fun Modifier.navigationBarsPadding(bottom: Boolean = true, left: Boolean = true, right: Boolean = true): Modifier
Apply additional space which matches the height of the navigation bars height along the bottom edge of the content, and additional space which matches the width of the navigation bars on the respective left and right edges.
navigationBarsWidth
Link copied to clipboard
fun Modifier.navigationBarsWidth(side: HorizontalSide, additional: Dp = 0.dp): Modifier
Declare the preferred width of the content to match the width of the navigation bars, on the given side.
navigationBarsWithImePadding
Link copied to clipboard
fun Modifier.navigationBarsWithImePadding(): Modifier
Apply additional space which matches the height of the WindowInsets.ime (on-screen keyboard) height and WindowInsets.navigationBars.
ProvideWindowInsets
Link copied to clipboard
@Composable()
fun ProvideWindowInsets(consumeWindowInsets: Boolean = true, content: @Composable() () -> Unit)
Applies any WindowInsetsCompat values to LocalWindowInsets, which are then available within content.
@Composable()
fun ProvideWindowInsets(windowInsetsAnimationsEnabled: Boolean, consumeWindowInsets: Boolean = true, content: @Composable() () -> Unit)
Applies any WindowInsetsCompat values to LocalWindowInsets, which are then available within content.
rememberImeNestedScrollConnection
Link copied to clipboard
@Composable()
fun rememberImeNestedScrollConnection(scrollImeOffScreenWhenVisible: Boolean = true, scrollImeOnScreenWhenNotVisible: Boolean = true): NestedScrollConnection
Remembers a NestedScrollConnection which scrolls the Android on-screen keyboard on/off screen as appropriate.
statusBarsHeight
Link copied to clipboard
fun Modifier.statusBarsHeight(additional: Dp = 0.dp): Modifier
Declare the height of the content to match the height of the status bars exactly.
statusBarsPadding
Link copied to clipboard
fun Modifier.statusBarsPadding(): Modifier
Apply additional space which matches the height of the status bars height along the top edge of the content.
systemBarsPadding
Link copied to clipboard
fun Modifier.systemBarsPadding(enabled: Boolean = true): Modifier
Selectively apply additional space which matches the width/height of any system bars present on the respective edges of the screen.
toPaddingValues
Link copied to clipboard
@Composable()
inline fun InsetsType.toPaddingValues(start: Boolean = true, top: Boolean = true, end: Boolean = true, bottom: Boolean = true, additionalHorizontal: Dp = 0.dp, additionalVertical: Dp = 0.dp): PaddingValues
Returns the current insets converted into a PaddingValues.
@Composable()
fun InsetsType.toPaddingValues(start: Boolean = true, top: Boolean = true, end: Boolean = true, bottom: Boolean = true, additionalStart: Dp = 0.dp, additionalTop: Dp = 0.dp, additionalEnd: Dp = 0.dp, additionalBottom: Dp = 0.dp): PaddingValues
Returns the current insets converted into a PaddingValues.

Properties

LocalWindowInsets
Link copied to clipboard
val LocalWindowInsets: ProvidableCompositionLocal<WindowInsets>
Composition local containing the current WindowInsets.