|
1 | 1 | // Use `xcodegen` first, then `open ./SkikoSample.xcodeproj` and then Run button in XCode.
|
2 | 2 | package androidx.compose.mpp.demo
|
3 | 3 |
|
4 |
| -import androidx.compose.foundation.layout.Column |
5 |
| -import androidx.compose.foundation.layout.fillMaxSize |
6 |
| -import androidx.compose.foundation.layout.safeDrawingPadding |
7 |
| -import androidx.compose.foundation.text.input.rememberTextFieldState |
8 |
| -import androidx.compose.material.Button |
9 |
| -import androidx.compose.material.MaterialTheme |
10 |
| -import androidx.compose.material.Text |
11 |
| -import androidx.compose.material.TextField |
12 | 4 | import androidx.compose.mpp.demo.bugs.IosBugs
|
13 | 5 | import androidx.compose.mpp.demo.bugs.StartRecompositionCheck
|
14 | 6 | import androidx.compose.runtime.Composable
|
15 |
| -import androidx.compose.runtime.mutableStateOf |
| 7 | +import androidx.compose.runtime.ExperimentalComposeApi |
16 | 8 | import androidx.compose.runtime.remember
|
17 | 9 | import androidx.compose.ui.ExperimentalComposeUiApi
|
18 |
| -import androidx.compose.ui.Modifier |
19 |
| -import androidx.compose.ui.platform.InterceptPlatformTextInput |
20 | 10 | import androidx.compose.ui.window.ComposeUIViewController
|
21 | 11 | import kotlinx.cinterop.BetaInteropApi
|
22 | 12 | import kotlinx.cinterop.autoreleasepool
|
23 | 13 | import kotlinx.cinterop.cstr
|
24 | 14 | import kotlinx.cinterop.memScoped
|
25 | 15 | import kotlinx.cinterop.toCValues
|
26 |
| -import kotlinx.coroutines.awaitCancellation |
27 | 16 | import platform.Foundation.NSStringFromClass
|
28 | 17 | import platform.UIKit.UIApplication
|
29 | 18 | import platform.UIKit.UIApplicationDelegateProtocol
|
@@ -54,37 +43,7 @@ fun main(vararg args: String) {
|
54 | 43 | parallelRendering = true
|
55 | 44 | }
|
56 | 45 | ) {
|
57 |
| - MaterialTheme { |
58 |
| - // IosDemo(arg) |
59 |
| - Column(modifier = Modifier.fillMaxSize().safeDrawingPadding()) { |
60 |
| - Text("Hello World!") |
61 |
| - Button({}) { |
62 |
| - Text("Hello Button!") |
63 |
| - } |
64 |
| - |
65 |
| - val text = rememberTextFieldState("test") |
66 |
| - InterceptPlatformTextInput( |
67 |
| - interceptor = { _, _ -> awaitCancellation() } |
68 |
| - ) { |
69 |
| - TextField(text) |
70 |
| - } |
71 |
| - |
72 |
| - val text1 = remember { mutableStateOf("test") } |
73 |
| - InterceptPlatformTextInput( |
74 |
| - interceptor = { _, _ -> awaitCancellation() } |
75 |
| - ) { |
76 |
| - TextField(text1.value, onValueChange = { text1.value = it}) |
77 |
| - } |
78 |
| - |
79 |
| - |
80 |
| - val text2 = rememberTextFieldState("test") |
81 |
| - TextField(text2) |
82 |
| - |
83 |
| - val text133 = remember { mutableStateOf("test") } |
84 |
| - TextField(text133.value, onValueChange = { text133.value = it}) |
85 |
| - |
86 |
| - } |
87 |
| - } |
| 46 | + IosDemo(arg) |
88 | 47 | }
|
89 | 48 | }
|
90 | 49 | }
|
|
0 commit comments