File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,21 @@ In the layout:
260
260
</androidx .coordinatorlayout.widget.CoordinatorLayout>
261
261
```
262
262
263
+ ### Status bar and edge-to-edge
264
+
265
+ ![ Small top app bar with edge-to-edge status bar] ( assets/topappbar/topappbar_small.png )
266
+
267
+ A common configuration for modern Top App Bars, as seen above, is to have a
268
+ seamless color shared with the status bar. The best way to achieve this is to
269
+ follow the
270
+ [ edge-to-edge guidance] ( https://developer.android.com/training/gestures/edge-to-edge ) ,
271
+ which will result in a transparent status bar that lets the background color of
272
+ the Top App Bar show through.
273
+
274
+ Make sure to set ` android:fitsSystemWindows="true" ` on your ` AppBarLayout ` (or
275
+ ` MaterialToolbar ` if not using ` AppBarLayout ` ), so that an extra inset is added
276
+ to avoid overlap with the status bar.
277
+
263
278
### Center aligned top app bar example
264
279
265
280
All of the same guidance and code from the sections above is relevant for Center
You can’t perform that action at this time.
0 commit comments