EdgeToEdge
public final class EdgeToEdge
Summary
Public methods |
|
|---|---|
static final void |
enable(Enables the edge-to-edge display for this |
Public methods
enable
public static final void enable(
@NonNull ComponentActivity receiver,
@NonNull SystemBarStyle statusBarStyle,
@NonNull SystemBarStyle navigationBarStyle
)
Enables the edge-to-edge display for this ComponentActivity.
To set it up with the default style, call this method in your Activity's onCreate method:
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
...
}The default style configures the system bars with a transparent background when contrast can be enforced by the system (API 29 or above). On older platforms (which only have 3-button/2-button navigation modes), an equivalent scrim is applied to ensure contrast with the system bars.
See SystemBarStyle for more customization options.
| Parameters | |
|---|---|
@NonNull SystemBarStyle statusBarStyle |
The |
@NonNull SystemBarStyle navigationBarStyle |
The |