Skip to content

Commit aea6b59

Browse files
authored
Fix code to show imports (#733)
1 parent 24fe7d8 commit aea6b59

File tree

4 files changed

+21
-22
lines changed

4 files changed

+21
-22
lines changed

wear/src/main/java/com/example/wear/snippets/m3/theme/Color.kt

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,21 @@ package com.example.wear.snippets.m3.theme
1818

1919
import androidx.compose.runtime.Composable
2020
import androidx.compose.ui.platform.LocalContext
21+
// [START android_wear_color]
2122
import androidx.wear.compose.material3.ColorScheme
23+
// [START_EXCLUDE]
2224
import androidx.wear.compose.material3.MaterialTheme
2325
import androidx.wear.compose.material3.dynamicColorScheme
2426

27+
28+
fun color() {
29+
// [END_EXCLUDE]
30+
val appColorScheme: ColorScheme = ColorScheme(
31+
// M3 ColorScheme parameters
32+
)
33+
// [END android_wear_color]
34+
}
35+
2536
// [START android_wear_dynamic_theme]
2637
@Composable
2738
fun myApp() {
@@ -30,12 +41,4 @@ fun myApp() {
3041
}
3142

3243
internal val myBrandColors: ColorScheme = ColorScheme( /* Specify colors here */)
33-
// [END android_wear_dynamic_theme]]
34-
35-
fun color() {
36-
// [START android_wear_color]
37-
val appColorScheme: ColorScheme = ColorScheme(
38-
// M3 ColorScheme parameters
39-
)
40-
// [END android_wear_color]
41-
}
44+
// [END android_wear_dynamic_theme]

wear/src/main/java/com/example/wear/snippets/m3/theme/Shape.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
*/
1616

1717
package com.example.wear.snippets.m3.theme
18-
18+
// [START android_wear_shape]
1919
import androidx.wear.compose.material3.Shapes
2020

21-
// [START android_wear_shape]
2221
val Shapes = Shapes(
2322
// M3 Shapes parameters
2423
)

wear/src/main/java/com/example/wear/snippets/m3/theme/Theme.kt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,21 @@ package com.example.wear.snippets.m3.theme
1818

1919
import androidx.compose.runtime.Composable
2020
import androidx.wear.compose.material3.ColorScheme
21+
// [START android_wear_material_theme]
2122
import androidx.wear.compose.material3.MaterialTheme
23+
// [START_EXCLUDE]
2224
import androidx.wear.compose.material3.MotionScheme
2325
import androidx.wear.compose.material3.Shapes
2426
import androidx.wear.compose.material3.Typography
2527

2628
@Composable
2729
fun materialTheme() {
28-
val appColorScheme = ColorScheme()
29-
val appTypography = Typography()
30-
val appShapes = Shapes()
31-
val appMotionScheme = MotionScheme.standard()
32-
// [START android_wear_material_theme]
30+
// [END_EXCLUDE]
3331
MaterialTheme(
34-
colorScheme = appColorScheme,
35-
typography = appTypography,
36-
shapes = appShapes,
37-
motionScheme = appMotionScheme,
32+
colorScheme = ColorScheme(),
33+
typography = Typography(),
34+
shapes = Shapes(),
35+
motionScheme = MotionScheme.standard(),
3836
content = { /*content here*/ }
3937
)
4038
// [END android_wear_material_theme]

wear/src/main/java/com/example/wear/snippets/m3/theme/Typography.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
*/
1616

1717
package com.example.wear.snippets.m3.theme
18-
18+
// [START android_wear_typography]
1919
import androidx.wear.compose.material3.Typography
2020

21-
// [START android_wear_typography]
2221
val Typography = Typography(
2322
// M3 TextStyle parameters
2423
)

0 commit comments

Comments
 (0)