Skip to content

Commit c16b9e5

Browse files
YTKacperSKYUrizel
authored andcommitted
addeed calimoto
1 parent 1393cec commit c16b9e5

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package de.berlindroid.zepatch.patchable
2+
3+
import androidx.compose.foundation.BorderStroke
4+
import androidx.compose.foundation.Image
5+
import androidx.compose.foundation.background
6+
import androidx.compose.foundation.border
7+
import androidx.compose.foundation.layout.Box
8+
import androidx.compose.foundation.layout.padding
9+
import androidx.compose.foundation.layout.size
10+
import androidx.compose.foundation.shape.RoundedCornerShape
11+
import androidx.compose.runtime.Composable
12+
import androidx.compose.ui.Modifier
13+
import androidx.compose.ui.draw.clip
14+
import androidx.compose.ui.graphics.Color
15+
import androidx.compose.ui.graphics.ImageBitmap
16+
import androidx.compose.ui.res.painterResource
17+
import androidx.compose.ui.tooling.preview.Preview
18+
import androidx.compose.ui.unit.dp
19+
import de.berlindroid.zepatch.R
20+
import de.berlindroid.zepatch.annotations.Patch
21+
import de.berlindroid.zepatch.ui.SafeArea
22+
23+
24+
@Patch("Calimoto")
25+
@Composable
26+
fun Calimoto(
27+
shouldCapture: Boolean = false,
28+
onBitmap: (ImageBitmap) -> Unit = {},
29+
) {
30+
SafeArea(
31+
shouldCapture = shouldCapture,
32+
onBitmap = onBitmap,
33+
) {
34+
Box(
35+
modifier = Modifier
36+
37+
) {
38+
Image(
39+
modifier = Modifier
40+
.size(200.dp)
41+
.padding(16.dp),
42+
painter = painterResource(R.drawable.calimoto),
43+
contentDescription = null
44+
)
45+
}
46+
}
47+
}
48+
49+
@Preview
50+
@Composable
51+
fun CalimotoPreview() {
52+
Calimoto()
53+
}
5.46 KB
Loading

0 commit comments

Comments
 (0)