File tree Expand file tree Collapse file tree 2 files changed +1
-16
lines changed
wear/src/main/java/com/example/wear/snippets/tile Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ private fun getTileTextToShow(): String {
5353
5454/* * Demonstrates a sweep transition animation on a [CircularProgressIndicator]. */
5555class AnimationSweepTransition : TileService () {
56- // [START android_wear_tile_animations_sweep-transition ]
56+ // [START android_wear_tile_animations_sweep_transition ]
5757 private var startValue = 15f
5858 private var endValue = 105f
5959 private val animationDurationInMillis = 2000L // 2 seconds
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ import androidx.wear.protolayout.TimelineBuilders
2727import androidx.wear.protolayout.TimelineBuilders.Timeline
2828import androidx.wear.protolayout.TypeBuilders
2929import androidx.wear.protolayout.expression.DynamicBuilders
30- import androidx.wear.protolayout.expression.DynamicBuilders.DynamicString
3130import androidx.wear.protolayout.expression.PlatformHealthSources
3231import androidx.wear.protolayout.material.Text
3332import androidx.wear.protolayout.material.Typography
@@ -202,17 +201,3 @@ class DynamicHeartRate : TileService() {
202201 )
203202 // [END android_wear_tile_dynamic_heart_rate]
204203}
205-
206- @RequiresPermission(
207- allOf = [Manifest .permission.ACTIVITY_RECOGNITION , Manifest .permission.BODY_SENSORS ]
208- )
209- fun dynamicExpression1 () {
210- // [START android_wear_tile_dynamic_expressions1]
211- val personHealthInfo =
212- DynamicString .constant(" This person has walked " )
213- .concat(PlatformHealthSources .dailySteps().div(1000 ).format())
214- .concat(DynamicString .constant(" thousands of steps and has a current heart rate " ))
215- .concat(PlatformHealthSources .heartRateBpm().format())
216- .concat(DynamicString .constant(" beats per minute" ))
217- // [END android_wear_tile_dynamic_expressions2]
218- }
You can’t perform that action at this time.
0 commit comments