Skip to content

Commit b686bfc

Browse files
committed
Fix code to show imports
1 parent 24fe7d8 commit b686bfc

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

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

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

1919
import androidx.compose.runtime.Composable
2020
import androidx.compose.ui.platform.LocalContext
21-
import androidx.wear.compose.material3.ColorScheme
2221
import androidx.wear.compose.material3.MaterialTheme
2322
import androidx.wear.compose.material3.dynamicColorScheme
2423

@@ -30,10 +29,14 @@ fun myApp() {
3029
}
3130

3231
internal val myBrandColors: ColorScheme = ColorScheme( /* Specify colors here */)
33-
// [END android_wear_dynamic_theme]]
32+
// [END android_wear_dynamic_theme]
33+
34+
// [START android_wear_color]
35+
import androidx.wear.compose.material3.ColorScheme
3436

37+
// [START_EXCLUDE]
3538
fun color() {
36-
// [START android_wear_color]
39+
// [END_EXCLUDE]
3740
val appColorScheme: ColorScheme = ColorScheme(
3841
// M3 ColorScheme parameters
3942
)

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)