2 files changed +4
-19
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import androidx.compose.ui.unit.dp
13
13
14
14
15
15
@Preview(showBackground = true )
16
+ // # --8<-- [start:func]
16
17
@Composable
17
18
fun BoxExample () {
18
19
Box (Modifier .fillMaxSize()) {
@@ -30,4 +31,5 @@ fun BoxExample() {
30
31
Text (" +" )
31
32
}
32
33
}
33
- }
34
+ }
35
+ // # --8<-- [end:func]
Original file line number Diff line number Diff line change @@ -11,24 +11,7 @@ The children of the Box layout will be stacked over each other. You can use the
11
11
12
12
13
13
``` kotlin
14
- @Composable
15
- fun BoxExample () {
16
- Box (Modifier .fillMaxSize()) {
17
- Text (" This text is drawn first" , modifier = Modifier .align(Alignment .TopCenter ))
18
- Box (
19
- Modifier .align(Alignment .TopCenter ).fillMaxHeight().width(
20
- 50 .dp
21
- ).background(Color .Blue )
22
- )
23
- Text (" This text is drawn last" , modifier = Modifier .align(Alignment .Center ))
24
- FloatingActionButton (
25
- modifier = Modifier .align(Alignment .BottomEnd ).padding(12 .dp),
26
- onClick = {}
27
- ) {
28
- Text (" +" )
29
- }
30
- }
31
- }
14
+ -- 8 < -- " layout/BoxExample.kt:func"
32
15
```
33
16
34
17
## Content Alignment
0 commit comments