Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ import com.example.wear.R
import com.google.android.horologist.compose.layout.ColumnItemType
import com.google.android.horologist.compose.layout.rememberResponsiveColumnPadding

@Composable
fun navController() {
// [START android_wear_nav_controller]
val navController = rememberSwipeDismissableNavController()
// [END android_wear_nav_controller]
}

@Composable
fun navHost() {
// [START android_wear_nav_host]
val navController = rememberSwipeDismissableNavController()
SwipeDismissableNavHost(
navController = navController,
startDestination = "message_list"
) {
// TODO: build navigation graph
}
// [END android_wear_nav_host]
}

@Composable
fun navigation() {
// [START android_wear_navigation]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ fun myApp() {

internal val myBrandColors: ColorScheme = ColorScheme( /* Specify colors here */)
// [END android_wear_dynamic_theme]]

fun color() {
// [START android_wear_color]
val appColorScheme: ColorScheme = ColorScheme(
// M3 ColorScheme parameters
)
// [END android_wear_color]
}
41 changes: 41 additions & 0 deletions wear/src/main/java/com/example/wear/snippets/m3/theme/Theme.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright 2025 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.wear.snippets.m3.theme

import androidx.compose.runtime.Composable
import androidx.wear.compose.material3.ColorScheme
import androidx.wear.compose.material3.MaterialTheme
import androidx.wear.compose.material3.MotionScheme
import androidx.wear.compose.material3.Shapes
import androidx.wear.compose.material3.Typography

@Composable
fun materialTheme() {
val appColorScheme = ColorScheme()
val appTypography = Typography()
val appShapes = Shapes()
val appMotionScheme = MotionScheme.standard()
// [START android_wear_material_theme]
MaterialTheme(
colorScheme = appColorScheme,
typography = appTypography,
shapes = appShapes,
motionScheme = appMotionScheme,
content = { /*content here*/ }
)
// [END android_wear_material_theme]
}