Package 

Class PaddingKt

    • Method Summary

      Modifier and Type Method Description
      final static Modifier systemBarsPadding(Modifier $self, Boolean enabled) Selectively apply additional space which matches the width/height of any system bars present on the respective edges of the screen.
      final static Modifier systemBarsPadding(Modifier $self, Boolean start, Boolean top, Boolean end, Boolean bottom) Selectively apply additional space which matches the width/height of any system bars present on the respective edges of the screen.
      final static Modifier statusBarsPadding(Modifier $self) Apply additional space which matches the height of the status bars height along the top edge of the content.
      final static Modifier navigationBarsPadding(Modifier $self, Boolean bottom, Boolean start, Boolean end) 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.
      final static Modifier imePadding(Modifier $self) Apply additional space which matches the height of the WindowInsets.ime (on-screen keyboard) height along the bottom edge of the content.
      final static Modifier cutoutPadding(Modifier $self, Boolean start, Boolean top, Boolean end, Boolean bottom) Selectively apply additional space which matches the width/height of any display cutout present on the respective edges of the screen.
      final static Modifier navigationBarsWithImePadding(Modifier $self) Apply additional space which matches the height of the WindowInsets.ime (on-screen keyboard) height and WindowInsets.navigationBars.
      final static PaddingValues toPaddingValues(WindowInsets.Type $self, Boolean start, Boolean top, Boolean end, Boolean bottom, Dp additionalHorizontal, Dp additionalVertical) Returns the current insets converted into a PaddingValues.
      final static PaddingValues toPaddingValues(WindowInsets.Type $self, Boolean start, Boolean top, Boolean end, Boolean bottom, Dp additionalStart, Dp additionalTop, Dp additionalEnd, Dp additionalBottom) Returns the current insets converted into a PaddingValues.
      final static PaddingValues rememberInsetsPaddingValues(Insets insets, Boolean applyStart, Boolean applyTop, Boolean applyEnd, Boolean applyBottom, Dp additionalStart, Dp additionalTop, Dp additionalEnd, Dp additionalBottom) Returns the provided insets insets in the form of a PaddingValues instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • systemBarsPadding

         final static Modifier systemBarsPadding(Modifier $self, Boolean enabled)

        Selectively apply additional space which matches the width/height of any system bars present on the respective edges of the screen.

        Parameters:
        enabled - Whether to apply padding using the system bars dimensions on the respective edges.
      • systemBarsPadding

         final static Modifier systemBarsPadding(Modifier $self, Boolean start, Boolean top, Boolean end, Boolean bottom)

        Selectively apply additional space which matches the width/height of any system bars present on the respective edges of the screen.

        Parameters:
        start - Whether to apply padding to the start edge, which matches the system bars width (if present) on the start edge of the screen.
        top - Whether to apply padding to the top edge, which matches the system bars height (if present) at the top edge of the screen.
        end - Whether to apply padding to the end edge, which matches the system bars width (if present) on the end edge of the screen.
        bottom - Whether to apply padding to the bottom edge, which matches the system bars height (if present) at the bottom edge of the screen.
      • statusBarsPadding

         final static Modifier statusBarsPadding(Modifier $self)

        Apply additional space which matches the height of the status bars height along the top edge of the content.

      • navigationBarsPadding

         final static Modifier navigationBarsPadding(Modifier $self, Boolean bottom, Boolean start, Boolean end)

        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.

        Parameters:
        bottom - Whether to apply padding to the bottom edge, which matches the navigation bars height (if present) at the bottom edge of the screen.
        start - Whether to apply padding to the start edge, which matches the navigation bars width (if present) on the start edge of the screen.
        end - Whether to apply padding to the end edge, which matches the navigation bars width (if present) on the end edge of the screen.
      • imePadding

         final static Modifier imePadding(Modifier $self)

        Apply additional space which matches the height of the WindowInsets.ime (on-screen keyboard) height along the bottom edge of the content.

        This method has no special handling for the WindowInsets.navigationBars, which usually intersect the WindowInsets.ime. Most apps will usually want to use the Modifier.navigationBarsWithImePadding modifier.

      • cutoutPadding

         final static Modifier cutoutPadding(Modifier $self, Boolean start, Boolean top, Boolean end, Boolean bottom)

        Selectively apply additional space which matches the width/height of any display cutout present on the respective edges of the screen.

        Parameters:
        start - Whether to apply padding to the start edge, which matches the display cutout width (if present) on the start edge of the screen.
        top - Whether to apply padding to the top edge, which matches the display cutout height (if present) at the top edge of the screen.
        end - Whether to apply padding to the end edge, which matches the display cutout width (if present) on the end edge of the screen.
        bottom - Whether to apply padding to the bottom edge, which matches the display cutout height (if present) at the bottom edge of the screen.
      • navigationBarsWithImePadding

         final static Modifier navigationBarsWithImePadding(Modifier $self)

        Apply additional space which matches the height of the WindowInsets.ime (on-screen keyboard) height and WindowInsets.navigationBars. This is what apps should use to handle any insets at the bottom of the screen.

      • toPaddingValues

         final static PaddingValues toPaddingValues(WindowInsets.Type $self, Boolean start, Boolean top, Boolean end, Boolean bottom, Dp additionalHorizontal, Dp additionalVertical)

        Returns the current insets converted into a PaddingValues.

        Parameters:
        start - Whether to apply the inset on the start dimension.
        top - Whether to apply the inset on the top dimension.
        end - Whether to apply the inset on the end dimension.
        bottom - Whether to apply the inset on the bottom dimension.
        additionalHorizontal - Value to add to the start and end dimensions.
        additionalVertical - Value to add to the top and bottom dimensions.
      • toPaddingValues

         final static PaddingValues toPaddingValues(WindowInsets.Type $self, Boolean start, Boolean top, Boolean end, Boolean bottom, Dp additionalStart, Dp additionalTop, Dp additionalEnd, Dp additionalBottom)

        Returns the current insets converted into a PaddingValues.

        Parameters:
        start - Whether to apply the inset on the start dimension.
        top - Whether to apply the inset on the top dimension.
        end - Whether to apply the inset on the end dimension.
        bottom - Whether to apply the inset on the bottom dimension.
        additionalStart - Value to add to the start dimension.
        additionalTop - Value to add to the top dimension.
        additionalEnd - Value to add to the end dimension.
        additionalBottom - Value to add to the bottom dimension.
      • rememberInsetsPaddingValues

         final static PaddingValues rememberInsetsPaddingValues(Insets insets, Boolean applyStart, Boolean applyTop, Boolean applyEnd, Boolean applyBottom, Dp additionalStart, Dp additionalTop, Dp additionalEnd, Dp additionalBottom)

        Returns the provided insets insets in the form of a PaddingValues instance.

        The returned instance is stable, meaning that any changes to the inset values will result in composition being notified, and these padding values being re-read.

        Parameters:
        insets - The WindowInsets.Type to read from.
        applyStart - Whether to apply the inset on the start dimension.
        applyTop - Whether to apply the inset on the top dimension.
        applyEnd - Whether to apply the inset on the end dimension.
        applyBottom - Whether to apply the inset on the bottom dimension.
        additionalStart - Value to add to the start dimension.
        additionalTop - Value to add to the top dimension.
        additionalEnd - Value to add to the end dimension.
        additionalBottom - Value to add to the bottom dimension.