Wear: add action tile
This commit is contained in:
parent
34c4dc2a98
commit
aab46e0f14
11 changed files with 318 additions and 3 deletions
|
@ -53,7 +53,7 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "info.nightscout.androidaps"
|
applicationId "info.nightscout.androidaps"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 28
|
targetSdkVersion 29
|
||||||
versionCode 2
|
versionCode 2
|
||||||
versionName "1.0.3"
|
versionName "1.0.3"
|
||||||
buildConfigField "String", "BUILDVERSION", generateGitBuild()
|
buildConfigField "String", "BUILDVERSION", generateGitBuild()
|
||||||
|
@ -115,6 +115,12 @@ dependencies {
|
||||||
implementation(name: 'wearpreferenceactivity-0.5.0', ext: 'aar')
|
implementation(name: 'wearpreferenceactivity-0.5.0', ext: 'aar')
|
||||||
implementation('com.github.lecho:hellocharts-library:1.5.8@aar')
|
implementation('com.github.lecho:hellocharts-library:1.5.8@aar')
|
||||||
|
|
||||||
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0-RC'
|
||||||
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.6.0-Rc'
|
||||||
|
implementation 'androidx.core:core-ktx:1.7.0'
|
||||||
|
implementation "androidx.wear.tiles:tiles:1.0.0"
|
||||||
|
|
||||||
|
implementation "androidx.core:core-ktx:$coreVersion"
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
|
|
||||||
testImplementation "junit:junit:$junit_version"
|
testImplementation "junit:junit:$junit_version"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="info.nightscout.androidaps">
|
package="info.nightscout.androidaps">
|
||||||
|
|
||||||
<uses-feature android:name="android.hardware.type.watch" />
|
<uses-feature android:name="android.hardware.type.watch" />
|
||||||
|
@ -8,6 +9,7 @@
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
|
|
||||||
|
<uses-sdk tools:overrideLibrary="androidx.wear.tiles" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".Aaps"
|
android:name=".Aaps"
|
||||||
|
@ -508,6 +510,19 @@
|
||||||
android:value="0" />
|
android:value="0" />
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name=".tile.ActionsTileService"
|
||||||
|
android:label="Pump Actions"
|
||||||
|
android:permission="com.google.android.wearable.permission.BIND_TILE_PROVIDER">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="androidx.wear.tiles.action.BIND_TILE_PROVIDER" />
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="androidx.wear.tiles.PREVIEW"
|
||||||
|
android:resource="@drawable/action_tile_preview" />
|
||||||
|
</service>
|
||||||
|
|
||||||
<receiver android:name=".complications.ComplicationTapBroadcastReceiver" />
|
<receiver android:name=".complications.ComplicationTapBroadcastReceiver" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
@ -523,6 +538,7 @@
|
||||||
android:label="@string/menu_settings" />
|
android:label="@string/menu_settings" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.WizardActivity"
|
android:name=".interaction.actions.WizardActivity"
|
||||||
|
android:exported="true"
|
||||||
android:label="@string/menu_wizard" />
|
android:label="@string/menu_wizard" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.menus.FillMenuActivity"
|
android:name=".interaction.menus.FillMenuActivity"
|
||||||
|
@ -532,6 +548,7 @@
|
||||||
android:label="@string/menu_status" />
|
android:label="@string/menu_status" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.BolusActivity"
|
android:name=".interaction.actions.BolusActivity"
|
||||||
|
android:exported="true"
|
||||||
android:label="@string/action_bolus" />
|
android:label="@string/action_bolus" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.CPPActivity"
|
android:name=".interaction.actions.CPPActivity"
|
||||||
|
@ -542,12 +559,15 @@
|
||||||
android:launchMode="singleInstance" />
|
android:launchMode="singleInstance" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.FillActivity"
|
android:name=".interaction.actions.FillActivity"
|
||||||
|
android:exported="true"
|
||||||
android:label="@string/menu_prime_fill" />
|
android:label="@string/menu_prime_fill" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.ECarbActivity"
|
android:name=".interaction.actions.ECarbActivity"
|
||||||
|
android:exported="true"
|
||||||
android:label="@string/action_carbs" />
|
android:label="@string/action_carbs" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.TempTargetActivity"
|
android:name=".interaction.actions.TempTargetActivity"
|
||||||
|
android:exported="true"
|
||||||
android:label="@string/menu_tempt" />
|
android:label="@string/menu_tempt" />
|
||||||
|
|
||||||
<activity android:name=".interaction.ConfigurationActivity">
|
<activity android:name=".interaction.ConfigurationActivity">
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
package info.nightscout.androidaps.tile
|
||||||
|
|
||||||
|
import androidx.annotation.DrawableRes
|
||||||
|
import androidx.annotation.StringRes
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.R
|
||||||
|
import info.nightscout.androidaps.interaction.actions.BolusActivity
|
||||||
|
import info.nightscout.androidaps.interaction.actions.ECarbActivity
|
||||||
|
import info.nightscout.androidaps.interaction.actions.TempTargetActivity
|
||||||
|
import info.nightscout.androidaps.interaction.actions.WizardActivity
|
||||||
|
|
||||||
|
data class Action(
|
||||||
|
val id: Long,
|
||||||
|
@StringRes val nameRes: Int,
|
||||||
|
val activityClass: String,
|
||||||
|
@DrawableRes val iconRes: Int,
|
||||||
|
)
|
||||||
|
|
||||||
|
object ActionSource {
|
||||||
|
|
||||||
|
fun getActions(): List<Action> {
|
||||||
|
return listOf(
|
||||||
|
Action(
|
||||||
|
id = 0,
|
||||||
|
nameRes = R.string.menu_wizard,
|
||||||
|
iconRes = R.drawable.ic_calculator_green,
|
||||||
|
activityClass = WizardActivity::class.java.getName(),
|
||||||
|
),
|
||||||
|
Action(
|
||||||
|
id = 1,
|
||||||
|
nameRes = R.string.action_bolus,
|
||||||
|
iconRes = R.drawable.ic_bolus_carbs,
|
||||||
|
activityClass = BolusActivity::class.java.getName(),
|
||||||
|
),
|
||||||
|
Action(
|
||||||
|
id = 2,
|
||||||
|
nameRes = R.string.action_carbs,
|
||||||
|
iconRes = R.drawable.ic_carbs_orange,
|
||||||
|
activityClass = ECarbActivity::class.java.getName(),
|
||||||
|
),
|
||||||
|
Action(
|
||||||
|
id = 3,
|
||||||
|
nameRes = R.string.menu_tempt,
|
||||||
|
iconRes = R.drawable.ic_temptarget_flat,
|
||||||
|
activityClass = TempTargetActivity::class.java.getName(),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,172 @@
|
||||||
|
package info.nightscout.androidaps.tile
|
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
|
|
||||||
|
import androidx.wear.tiles.ActionBuilders
|
||||||
|
import androidx.wear.tiles.ColorBuilders.argb
|
||||||
|
import androidx.wear.tiles.DeviceParametersBuilders.DeviceParameters
|
||||||
|
import androidx.wear.tiles.DimensionBuilders.dp
|
||||||
|
import androidx.wear.tiles.LayoutElementBuilders.Box
|
||||||
|
import androidx.wear.tiles.LayoutElementBuilders.Column
|
||||||
|
import androidx.wear.tiles.LayoutElementBuilders.FontStyles
|
||||||
|
import androidx.wear.tiles.LayoutElementBuilders.Image
|
||||||
|
import androidx.wear.tiles.LayoutElementBuilders.Layout
|
||||||
|
import androidx.wear.tiles.LayoutElementBuilders.LayoutElement
|
||||||
|
import androidx.wear.tiles.LayoutElementBuilders.Row
|
||||||
|
import androidx.wear.tiles.LayoutElementBuilders.Spacer
|
||||||
|
import androidx.wear.tiles.LayoutElementBuilders.Text
|
||||||
|
import androidx.wear.tiles.ModifiersBuilders.Background
|
||||||
|
import androidx.wear.tiles.ModifiersBuilders.Clickable
|
||||||
|
import androidx.wear.tiles.ModifiersBuilders.Corner
|
||||||
|
import androidx.wear.tiles.ModifiersBuilders.Modifiers
|
||||||
|
import androidx.wear.tiles.ModifiersBuilders.Semantics
|
||||||
|
import androidx.wear.tiles.RequestBuilders
|
||||||
|
import androidx.wear.tiles.RequestBuilders.ResourcesRequest
|
||||||
|
import androidx.wear.tiles.ResourceBuilders.AndroidImageResourceByResId
|
||||||
|
import androidx.wear.tiles.ResourceBuilders.ImageResource
|
||||||
|
import androidx.wear.tiles.ResourceBuilders.Resources
|
||||||
|
import androidx.wear.tiles.TileBuilders.Tile
|
||||||
|
import androidx.wear.tiles.TileService
|
||||||
|
import androidx.wear.tiles.TimelineBuilders.Timeline
|
||||||
|
import androidx.wear.tiles.TimelineBuilders.TimelineEntry
|
||||||
|
|
||||||
|
import com.google.common.util.concurrent.ListenableFuture
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.R
|
||||||
|
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.Job
|
||||||
|
import kotlinx.coroutines.guava.future
|
||||||
|
|
||||||
|
private const val RESOURCES_VERSION = "1"
|
||||||
|
private const val ID_IC_ACTION_PREFIX = "ic_action_"
|
||||||
|
private const val CIRCLE_SIZE = 75f
|
||||||
|
private val ICON_SIZE = dp(25f)
|
||||||
|
private val SPACING_ACTIONS = dp(3f)
|
||||||
|
private const val BUTTON_COLOR = R.color.gray_850
|
||||||
|
|
||||||
|
class ActionsTileService : TileService() {
|
||||||
|
|
||||||
|
private val serviceJob = Job()
|
||||||
|
private val serviceScope = CoroutineScope(Dispatchers.IO + serviceJob)
|
||||||
|
|
||||||
|
override fun onTileRequest(
|
||||||
|
requestParams: RequestBuilders.TileRequest
|
||||||
|
): ListenableFuture<Tile> = serviceScope.future {
|
||||||
|
val actions = ActionSource.getActions().take(4)
|
||||||
|
Tile.Builder()
|
||||||
|
.setResourcesVersion(RESOURCES_VERSION)
|
||||||
|
.setTimeline(
|
||||||
|
Timeline.Builder().addTimelineEntry(
|
||||||
|
TimelineEntry.Builder().setLayout(
|
||||||
|
Layout.Builder().setRoot(layout(actions, requestParams.deviceParameters!!)).build()
|
||||||
|
).build()
|
||||||
|
).build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResourcesRequest(
|
||||||
|
requestParams: ResourcesRequest
|
||||||
|
): ListenableFuture<Resources> = serviceScope.future {
|
||||||
|
val actions = ActionSource.getActions().take(4)
|
||||||
|
Resources.Builder()
|
||||||
|
.setVersion(RESOURCES_VERSION)
|
||||||
|
.apply {
|
||||||
|
actions.mapNotNull { action ->
|
||||||
|
addIdToImageMapping(
|
||||||
|
ID_IC_ACTION_PREFIX + action.id,
|
||||||
|
ImageResource.Builder()
|
||||||
|
.setAndroidResourceByResId(
|
||||||
|
AndroidImageResourceByResId.Builder()
|
||||||
|
.setResourceId(action.iconRes)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun layout(actions: List<Action>, deviceParameters: DeviceParameters): LayoutElement =
|
||||||
|
Column.Builder()
|
||||||
|
.addContent(
|
||||||
|
Row.Builder()
|
||||||
|
.addContent(action(actions[0], deviceParameters))
|
||||||
|
.addContent(Spacer.Builder().setWidth(SPACING_ACTIONS).build())
|
||||||
|
.addContent(action(actions[1], deviceParameters))
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.addContent(Spacer.Builder().setHeight(SPACING_ACTIONS).build())
|
||||||
|
.addContent(
|
||||||
|
Row.Builder()
|
||||||
|
.addContent(action(actions[2], deviceParameters))
|
||||||
|
.addContent(Spacer.Builder().setWidth(SPACING_ACTIONS).build())
|
||||||
|
.addContent(action(actions[3], deviceParameters))
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
private fun action(action: Action, deviceParameters: DeviceParameters) = Box.Builder()
|
||||||
|
.setWidth(dp(CIRCLE_SIZE))
|
||||||
|
.setHeight(dp(CIRCLE_SIZE))
|
||||||
|
.setModifiers(
|
||||||
|
Modifiers.Builder()
|
||||||
|
.setBackground(
|
||||||
|
Background.Builder()
|
||||||
|
.setColor(
|
||||||
|
argb(ContextCompat.getColor(baseContext, BUTTON_COLOR))
|
||||||
|
)
|
||||||
|
.setCorner(
|
||||||
|
Corner.Builder().setRadius(dp(CIRCLE_SIZE / 2)).build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.setSemantics(
|
||||||
|
Semantics.Builder()
|
||||||
|
.setContentDescription(resources.getString(action.nameRes))
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.setClickable(
|
||||||
|
Clickable.Builder()
|
||||||
|
.setOnClick(
|
||||||
|
ActionBuilders.LaunchAction.Builder()
|
||||||
|
.setAndroidActivity(
|
||||||
|
ActionBuilders.AndroidActivity.Builder()
|
||||||
|
.setClassName(action.activityClass)
|
||||||
|
.setPackageName(this.packageName)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.addContent(
|
||||||
|
Column.Builder()
|
||||||
|
.addContent(
|
||||||
|
Image.Builder()
|
||||||
|
.setWidth(ICON_SIZE)
|
||||||
|
.setHeight(ICON_SIZE)
|
||||||
|
.setResourceId(ID_IC_ACTION_PREFIX + action.id)
|
||||||
|
.build()
|
||||||
|
).addContent(
|
||||||
|
Text.Builder()
|
||||||
|
.setText(resources.getString(action.nameRes))
|
||||||
|
.setFontStyle(
|
||||||
|
FontStyles
|
||||||
|
.button(deviceParameters)
|
||||||
|
.setColor(
|
||||||
|
argb(ContextCompat.getColor(baseContext, R.color.white))
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
).build()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 177 KiB |
BIN
wear/src/main/res/drawable-round-nodpi/action_tile_preview.png
Normal file
BIN
wear/src/main/res/drawable-round-nodpi/action_tile_preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 177 KiB |
11
wear/src/main/res/drawable/ic_bolus_carbs.xml
Normal file
11
wear/src/main/res/drawable/ic_bolus_carbs.xml
Normal file
File diff suppressed because one or more lines are too long
27
wear/src/main/res/drawable/ic_calculator_green.xml
Normal file
27
wear/src/main/res/drawable/ic_calculator_green.xml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#67E86A"
|
||||||
|
android:pathData="M17.625,15.345h-4.083c-0.063,0 -0.113,0.051 -0.113,0.113v1.292c0,0.063 0.051,0.113 0.113,0.113h4.083c0.063,0 0.113,-0.051 0.113,-0.113v-1.292C17.738,15.396 17.688,15.345 17.625,15.345z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#67E86A"
|
||||||
|
android:pathData="M16.343,14.036c0,-0.063 -0.051,-0.113 -0.113,-0.113h-1.292c-0.063,0 -0.113,0.051 -0.113,0.113v1.016h1.519V14.036z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#67E86A"
|
||||||
|
android:pathData="M14.824,18.119c0,0.063 0.051,0.113 0.113,0.113h1.292c0.063,0 0.113,-0.051 0.113,-0.113v-1.017h-1.519V18.119z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#67E86A"
|
||||||
|
android:pathData="M19.836,1.96h-15.1c-0.344,0 -0.624,0.279 -0.624,0.624v18.375c0,0.345 0.279,0.624 0.624,0.624h15.1c0.345,0 0.624,-0.279 0.624,-0.624V2.583C20.46,2.239 20.181,1.96 19.836,1.96zM19.212,20.334H5.36V7.04h13.852V20.334zM19.212,5.793H5.36V3.207h13.852V5.793z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#67E86A"
|
||||||
|
android:pathData="M13.542,11.363h4.083c0.063,0 0.113,-0.051 0.113,-0.113V9.958c0,-0.063 -0.051,-0.113 -0.113,-0.113h-4.083c-0.063,0 -0.113,0.051 -0.113,0.113v1.292C13.429,11.313 13.479,11.363 13.542,11.363z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#67E86A"
|
||||||
|
android:pathData="M7.042,11.363h1.283v1.282c0,0.063 0.051,0.113 0.113,0.113h1.292c0.063,0 0.113,-0.051 0.113,-0.113v-1.282h1.283c0.063,0 0.113,-0.051 0.113,-0.113V9.958c0,-0.063 -0.051,-0.113 -0.113,-0.113H9.842V8.563c0,-0.063 -0.051,-0.113 -0.113,-0.113H8.438c-0.063,0 -0.113,0.051 -0.113,0.113v1.283H7.042c-0.063,0 -0.113,0.051 -0.113,0.113v1.292C6.928,11.313 6.979,11.363 7.042,11.363z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#67E86A"
|
||||||
|
android:pathData="M10.157,16.078l0.907,-0.907c0.021,-0.021 0.033,-0.05 0.033,-0.08s-0.012,-0.059 -0.033,-0.08l-0.914,-0.913c-0.044,-0.045 -0.116,-0.045 -0.16,0l-0.907,0.907l-0.907,-0.907c-0.044,-0.045 -0.116,-0.045 -0.16,0l-0.913,0.913c-0.044,0.044 -0.044,0.116 0,0.16l0.907,0.907l-0.907,0.907c-0.044,0.044 -0.044,0.116 0,0.16l0.913,0.914c0.021,0.021 0.05,0.033 0.08,0.033s0.059,-0.012 0.08,-0.033l0.907,-0.907l0.907,0.907c0.021,0.021 0.05,0.033 0.08,0.033s0.059,-0.012 0.08,-0.033l0.914,-0.914c0.044,-0.044 0.044,-0.116 0,-0.16L10.157,16.078z" />
|
||||||
|
</vector>
|
11
wear/src/main/res/drawable/ic_carbs_orange.xml
Normal file
11
wear/src/main/res/drawable/ic_carbs_orange.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="6.35"
|
||||||
|
android:viewportHeight="6.3500004">
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/colorCarbsButton"
|
||||||
|
android:pathData="m0.07296,6.18173c-0.11224,-0.12403 -0.10912,-0.13361 0.10984,-0.33755 0.12395,-0.11545 0.23996,-0.2533 0.25781,-0.30635 0.01785,-0.053 -0.07223,-0.28451 -0.20017,-0.51436 -0.22165,-0.3982 -0.23262,-0.44673 -0.23262,-1.02872 0,-0.55596 0.01701,-0.64151 0.18944,-0.95278 0.22952,-0.41433 0.59748,-0.76138 0.6993,-0.65956 0.13093,0.13093 0.21005,0.0684 0.38036,-0.30044 0.26666,-0.57755 0.49667,-0.81559 0.79028,-0.81787 0.2299,-0.002 0.24962,-0.0181 0.33616,-0.27725 0.05109,-0.15301 0.23231,-0.42442 0.40784,-0.61081l0.3159,-0.33544 0.25358,0.28625c0.13947,0.15744 0.30496,0.38166 0.36776,0.49829 0.0628,0.11662 0.15097,0.21203 0.19592,0.21203 0.04495,0 0.24814,-0.12905 0.45152,-0.28678 0.51384,-0.3985 0.94794,-0.53103 1.6161,-0.49339 0.14888,0.008 0.1524,0.0212 0.12218,0.44366 -0.03807,0.53204 -0.21229,0.9432 -0.55908,1.31942 -0.1446,0.15688 -0.26291,0.31727 -0.26291,0.35643 0,0.0392 0.1519,0.17085 0.33755,0.29265 0.18565,0.1218 0.41917,0.2894 0.51892,0.37247l0.18137,0.15102 -0.24567,0.24913c-0.13512,0.13703 -0.4048,0.32226 -0.59929,0.41164 -0.40112,0.18432 -0.46482,0.2508 -0.38439,0.40109 0.07321,0.13678 -0.29996,0.50766 -0.70863,0.70428 -0.48739,0.23449 -0.48332,0.23068 -0.46326,0.43341 0.01515,0.15308 -0.02944,0.23403 -0.2221,0.40318 -0.13258,0.11641 -0.39723,0.28315 -0.5881,0.37054 -0.30449,0.13941 -0.4133,0.1554 -0.88737,0.13052 -0.46672,-0.0245 -0.60186,-0.0605 -0.99207,-0.26433l-0.45174,-0.23597 -0.27839,0.25662c-0.15311,0.14114 -0.29237,0.25661 -0.30946,0.25661 -0.01709,0 -0.08305,-0.0574 -0.14659,-0.12764zM3.04651,5.79095c0.15071,-0.0649 0.29301,-0.16746 0.31623,-0.22796 0.10323,-0.26902 -0.77255,-0.65358 -1.31812,-0.5788 -0.37535,0.0515 -0.84735,0.32482 -0.84735,0.49076 0,0.24793 0.84009,0.5377 1.3502,0.46571 0.12377,-0.0175 0.34834,-0.0848 0.49905,-0.14971zM1.11599,4.81897c0.15268,-0.23095 0.17746,-0.33287 0.17587,-0.72332 -0.00236,-0.57649 -0.23257,-1.09745 -0.48498,-1.09745 -0.34938,0 -0.57808,0.97634 -0.37051,1.58171 0.19749,0.57597 0.40794,0.64999 0.67962,0.23906zM3.89797,4.76028c0.37387,-0.0802 0.68406,-0.30762 0.62598,-0.45898 -0.07426,-0.19351 -0.7192,-0.44794 -1.13545,-0.44794 -0.41266,0 -0.85838,0.18827 -0.99593,0.42069 -0.08449,0.14275 0.06918,0.27006 0.53279,0.4414 0.35307,0.1305 0.53422,0.13884 0.97261,0.0448zM2.15803,3.85532c0.34991,-0.37558 0.41361,-1.10931 0.14245,-1.64082 -0.25871,-0.50712 -0.42704,-0.51919 -0.65561,-0.047 -0.24344,0.50288 -0.17855,1.15285 0.16799,1.68264 0.11803,0.18046 0.18101,0.18141 0.34517,0.005zM5.36038,3.51489c0.35541,-0.16547 0.41056,-0.27201 0.22503,-0.43468 -0.49497,-0.43399 -1.35656,-0.47981 -1.89671,-0.10086 -0.27763,0.19477 -0.2274,0.33089 0.19289,0.52273 0.49552,0.22618 1.01089,0.23064 1.47879,0.0128zM3.46831,2.45169c0.14931,-0.29099 0.17721,-0.41624 0.15753,-0.70724 -0.02598,-0.38422 -0.2646,-0.93731 -0.44636,-1.03458 -0.15905,-0.0851 -0.35661,0.14839 -0.47756,0.56444 -0.11452,0.39395 -0.0528,0.87509 0.1677,1.3073 0.18957,0.3716 0.36037,0.33453 0.59868,-0.12992zM4.76565,2.13351c0.38101,-0.16525 0.6449,-0.41584 0.83084,-0.78896 0.30455,-0.61116 0.19648,-0.81689 -0.34467,-0.65619 -0.56982,0.16922 -1.17734,0.8697 -1.17734,1.35748 0,0.29794 0.15966,0.31819 0.69117,0.0877z"
|
||||||
|
android:strokeWidth="1" />
|
||||||
|
</vector>
|
12
wear/src/main/res/drawable/ic_temptarget_flat.xml
Normal file
12
wear/src/main/res/drawable/ic_temptarget_flat.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/inrange"
|
||||||
|
android:pathData="M7.242,17.689c-0.005,0 -0.011,0 -0.017,0c-0.695,-0.013 -1.318,-0.829 -1.709,-2.24c-0.285,-1.029 -0.542,-2.103 -0.792,-3.141c-0.156,-0.65 -0.313,-1.301 -0.476,-1.945L4.14,9.929c-0.369,-1.486 -0.75,-3.024 -1.746,-3.197c-0.116,-0.02 -0.193,-0.13 -0.173,-0.246s0.129,-0.189 0.246,-0.173C3.735,6.534 4.15,8.208 4.552,9.827l0.108,0.432c0.164,0.646 0.321,1.298 0.478,1.951c0.249,1.035 0.506,2.104 0.789,3.127c0.322,1.163 0.834,1.92 1.307,1.929c0.002,0 0.005,0 0.008,0c0.443,0 0.905,-0.656 1.269,-1.804c0.188,-0.592 0.349,-1.229 0.504,-1.847l0.124,-0.487c0.138,-0.536 0.268,-1.08 0.398,-1.624c0.267,-1.114 0.542,-2.265 0.878,-3.332c0.373,-1.182 0.928,-1.836 1.565,-1.842c0.003,0 0.005,0 0.008,0c0.639,0 1.208,0.65 1.603,1.832c0.278,0.833 0.514,1.729 0.74,2.598l0.177,0.671c0.147,0.553 0.288,1.112 0.43,1.672c0.24,0.956 0.489,1.945 0.769,2.879c0.229,0.77 0.619,1.26 1.017,1.28c0.356,0.043 0.729,-0.362 1.011,-1.041c0.271,-0.651 0.521,-1.41 0.761,-2.318c0.333,-1.265 0.648,-2.547 0.964,-3.829c0.146,-0.592 0.291,-1.184 0.438,-1.773c0.281,-1.125 0.812,-1.774 1.62,-1.983c0.111,-0.028 0.229,0.04 0.259,0.153c0.029,0.114 -0.039,0.229 -0.153,0.259c-0.652,0.168 -1.069,0.7 -1.313,1.674c-0.147,0.589 -0.293,1.181 -0.438,1.772c-0.316,1.284 -0.633,2.568 -0.966,3.836c-0.245,0.928 -0.5,1.704 -0.779,2.374c-0.487,1.17 -1.097,1.32 -1.426,1.302c-0.59,-0.03 -1.114,-0.622 -1.402,-1.584c-0.281,-0.941 -0.531,-1.936 -0.773,-2.896c-0.14,-0.558 -0.28,-1.115 -0.427,-1.666l-0.178,-0.673c-0.225,-0.861 -0.458,-1.751 -0.731,-2.57c-0.323,-0.966 -0.772,-1.541 -1.201,-1.541c-0.001,0 -0.002,0 -0.004,0c-0.425,0.003 -0.86,0.581 -1.164,1.544c-0.331,1.052 -0.605,2.196 -0.87,3.303c-0.131,0.546 -0.262,1.092 -0.399,1.63l-0.124,0.486c-0.158,0.623 -0.32,1.268 -0.512,1.871C8.367,17.32 7.706,17.689 7.242,17.689z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/tempTargetConfirmation"
|
||||||
|
android:pathData="M21.563,12.709H2.424c-0.392,0 -0.708,-0.317 -0.708,-0.709s0.317,-0.708 0.708,-0.708h19.139c0.392,0 0.709,0.317 0.709,0.708S21.954,12.709 21.563,12.709z" />
|
||||||
|
</vector>
|
|
@ -46,6 +46,10 @@
|
||||||
<color name="colorTemptButton">#CF8BFE</color>
|
<color name="colorTemptButton">#CF8BFE</color>
|
||||||
<color name="colorPrimeButton">#FBC02D</color>
|
<color name="colorPrimeButton">#FBC02D</color>
|
||||||
|
|
||||||
|
|
||||||
|
<color name="inrange">#00FF00</color>
|
||||||
|
<color name="tempTargetConfirmation">#77dd77</color>
|
||||||
|
|
||||||
<!-- Material Design - Color Palette -->
|
<!-- Material Design - Color Palette -->
|
||||||
<!-- https://designguidelines.withgoogle.com/wearos/style/color.html#color-dark-color-palette-for-wear-os -->
|
<!-- https://designguidelines.withgoogle.com/wearos/style/color.html#color-dark-color-palette-for-wear-os -->
|
||||||
<!-- https://material.io/design/color/the-color-system.html#tools-for-picking-colors -->
|
<!-- https://material.io/design/color/the-color-system.html#tools-for-picking-colors -->
|
||||||
|
@ -157,13 +161,16 @@
|
||||||
<color name="brown_900">#3E2723</color>
|
<color name="brown_900">#3E2723</color>
|
||||||
|
|
||||||
<!-- Gray / Grey -->
|
<!-- Gray / Grey -->
|
||||||
<!-- @ToDo Replace all usage from grey to gray, because that's the official color name in https://material.io/deign/color/ -->
|
<!-- @ToDo Replace all usage from grey to gray, because that's the official color name in https://material.io/deign/color/ -->
|
||||||
<color name="grey_50">#FAFAFA</color>
|
<color name="grey_50">#FAFAFA</color>
|
||||||
<color name="gray_100">#F5F5F5</color>
|
<color name="gray_100">#F5F5F5</color>
|
||||||
<color name="grey_300">#E0E0E0</color>
|
<color name="grey_300">#E0E0E0</color>
|
||||||
<color name="grey_500">#9E9E9E</color>
|
<color name="grey_500">#9E9E9E</color>
|
||||||
<color name="gray_500">#9E9E9E</color> <!-- needed because rICTxWF01 generate color-names as grAy -->
|
<color name="gray_500">#9E9E9E
|
||||||
|
</color> <!-- needed because rICTxWF01 generate color-names as grAy -->
|
||||||
<color name="gray_700">#616161</color>
|
<color name="gray_700">#616161</color>
|
||||||
|
<color name="gray_800">#424242</color>
|
||||||
|
<color name="gray_850">#313131</color>
|
||||||
<color name="gray_900">#212121</color>
|
<color name="gray_900">#212121</color>
|
||||||
<color name="grey_steampunk">#333333</color>
|
<color name="grey_steampunk">#333333</color>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue