Package com.google.accompanist.insets

Types

ExperimentalAnimatedInsets
Link copied to clipboard
annotation class ExperimentalAnimatedInsets
HorizontalSide
Link copied to clipboard
enum HorizontalSide : Enum<HorizontalSide>
Represents a horizontal side of the display.
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
interface Insets
Interface which represents a single set of inset values.
VerticalSide
Link copied to clipboard
enum VerticalSide : Enum<VerticalSide>
Represents a vertical side of the display.
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
interface WindowInsets
The main insets holder, containing instances of WindowInsets.Type which each refer to different types of system display insets.

Functions

coerceEachDimensionAtLeast
Link copied to clipboard
fun Insets.coerceEachDimensionAtLeast(minimumValue: Insets): Insets
Ensures that each dimension is not less than corresponding dimension in the specified minimumValue.
cutoutPadding
Link copied to clipboard
inline fun Modifier.cutoutPadding(start: Boolean = true, top: Boolean = true, end: Boolean = true, bottom: Boolean = true): Modifier
Selectively apply additional space which matches the width/height of any display cutout present on the respective edges of the screen.
derivedWindowInsetsTypeOf
Link copied to clipboard
fun derivedWindowInsetsTypeOf(vararg types: WindowInsets.Type): WindowInsets.Type
Returns an instance of WindowInsets.Type whose values are calculated and derived from the WindowInsets.Type instances passed in to types.
imePadding
Link copied to clipboard
inline 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
inline fun Modifier.navigationBarsPadding(bottom: Boolean = true, start: Boolean = true, end: 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 start and end 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
inline 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
fun ProvideWindowInsets(consumeWindowInsets: Boolean = true, windowInsetsAnimationsEnabled: Boolean = true, content: @Composable() () -> Unit)
Applies any WindowInsetsCompat values to LocalWindowInsets, which are then available within content.
rememberImeNestedScrollConnection
Link copied to clipboard
fun rememberImeNestedScrollConnection(scrollImeOffScreenWhenVisible: Boolean = true, scrollImeOnScreenWhenNotVisible: Boolean = true): NestedScrollConnection
Remembers a NestedScrollConnection which scrolls the Android on-screen keyboard on/off screen as appropriate.
rememberInsetsPaddingValues
Link copied to clipboard
fun rememberInsetsPaddingValues(insets: Insets, applyStart: Boolean = true, applyTop: Boolean = true, applyEnd: Boolean = true, applyBottom: Boolean = true, additionalStart: Dp = 0.dp, additionalTop: Dp = 0.dp, additionalEnd: Dp = 0.dp, additionalBottom: Dp = 0.dp): PaddingValues
Returns the provided insets insets in the form of a PaddingValues instance.
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
inline 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
inline 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.
inline fun Modifier.systemBarsPadding(start: Boolean = true, top: Boolean = true, end: Boolean = true, bottom: Boolean = true): Modifier
Selectively apply additional space which matches the width/height of any system bars present on the respective edges of the screen.

Properties

LocalWindowInsets
Link copied to clipboard
Composition local containing the current WindowInsets.