Remove Steampunk Watchface

This commit is contained in:
Philoul 2023-10-04 23:02:00 +02:00
parent cf12baeb3b
commit 970c946113
19 changed files with 19 additions and 652 deletions

View file

@ -145,31 +145,6 @@
</intent-filter> </intent-filter>
</service> </service>
<service
android:name=".watchfaces.SteampunkWatchface"
android:allowEmbedded="true"
android:exported="false"
android:label="@string/label_watchface_steampunk"
android:permission="android.permission.BIND_WALLPAPER">
<meta-data
android:name="android.service.wallpaper"
android:resource="@xml/watch_face" />
<meta-data
android:name="com.google.android.wearable.watchface.preview"
android:resource="@drawable/watchface_steampunk" />
<meta-data
android:name="com.google.android.wearable.watchface.wearableConfigurationAction"
android:value="watch_face_configuration_steampunk" />
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
</intent-filter>
</service>
<service <service
android:name=".watchfaces.AapsLargeWatchface" android:name=".watchfaces.AapsLargeWatchface"
android:allowEmbedded="true" android:allowEmbedded="true"
@ -656,7 +631,6 @@
<action android:name="watch_face_configuration_home2" /> <action android:name="watch_face_configuration_home2" />
<action android:name="watch_face_configuration_largehome" /> <action android:name="watch_face_configuration_largehome" />
<action android:name="watch_face_configuration_nochart" /> <action android:name="watch_face_configuration_nochart" />
<action android:name="watch_face_configuration_steampunk" />
<category android:name="com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION" /> <category android:name="com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />

View file

@ -28,7 +28,6 @@ import app.aaps.wear.watchfaces.CockpitWatchface
import app.aaps.wear.watchfaces.CustomWatchface import app.aaps.wear.watchfaces.CustomWatchface
import app.aaps.wear.watchfaces.DigitalStyleWatchface import app.aaps.wear.watchfaces.DigitalStyleWatchface
import app.aaps.wear.watchfaces.NoChartWatchface import app.aaps.wear.watchfaces.NoChartWatchface
import app.aaps.wear.watchfaces.SteampunkWatchface
import app.aaps.wear.watchfaces.utils.BaseWatchFace import app.aaps.wear.watchfaces.utils.BaseWatchFace
import dagger.Module import dagger.Module
import dagger.android.ContributesAndroidInjector import dagger.android.ContributesAndroidInjector
@ -57,7 +56,6 @@ abstract class WearServicesModule {
@ContributesAndroidInjector abstract fun contributesAapsWatchface(): AapsWatchface @ContributesAndroidInjector abstract fun contributesAapsWatchface(): AapsWatchface
@ContributesAndroidInjector abstract fun contributesAapsV2Watchface(): AapsV2Watchface @ContributesAndroidInjector abstract fun contributesAapsV2Watchface(): AapsV2Watchface
@ContributesAndroidInjector abstract fun contributesAapsLargeWatchface(): AapsLargeWatchface @ContributesAndroidInjector abstract fun contributesAapsLargeWatchface(): AapsLargeWatchface
@ContributesAndroidInjector abstract fun contributesSteampunk(): SteampunkWatchface
@ContributesAndroidInjector abstract fun contributesDigitalStyleWatchface(): DigitalStyleWatchface @ContributesAndroidInjector abstract fun contributesDigitalStyleWatchface(): DigitalStyleWatchface
@ContributesAndroidInjector abstract fun contributesCockpitWatchface(): CockpitWatchface @ContributesAndroidInjector abstract fun contributesCockpitWatchface(): CockpitWatchface
@ContributesAndroidInjector abstract fun contributesBIGChart(): BigChartWatchface @ContributesAndroidInjector abstract fun contributesBIGChart(): BigChartWatchface

View file

@ -1,193 +0,0 @@
@file:Suppress("DEPRECATION")
package app.aaps.wear.watchfaces
import android.view.LayoutInflater
import android.view.animation.Animation
import android.view.animation.LinearInterpolator
import android.view.animation.RotateAnimation
import androidx.core.content.ContextCompat
import androidx.viewbinding.ViewBinding
import app.aaps.core.interfaces.utils.SafeParse.stringToFloat
import app.aaps.wear.R
import app.aaps.wear.databinding.ActivitySteampunkBinding
import app.aaps.wear.watchfaces.utils.BaseWatchFace
import org.joda.time.TimeOfDay
/**
* Created by andrew-warrington on 01/12/2017.
* Refactored by MilosKozak on 23/04/2022
*/
class SteampunkWatchface : BaseWatchFace() {
private var lastEndDegrees = 0f
private var deltaRotationAngle = 0f
private lateinit var binding: ActivitySteampunkBinding
override fun inflateLayout(inflater: LayoutInflater): ViewBinding {
binding = ActivitySteampunkBinding.inflate(inflater)
return binding
}
override fun onCreate() {
forceSquareCanvas = true
super.onCreate()
}
override fun setColorDark() {
if (ageLevel() <= 0 && singleBg.timeStamp != 0L) {
binding.tertiaryLayout.setBackgroundResource(R.drawable.redline)
binding.timestamp.setTextColor(ContextCompat.getColor(this, R.color.red_600))
} else {
binding.tertiaryLayout.setBackgroundResource(0)
binding.timestamp.setTextColor(ContextCompat.getColor(this, android.support.wearable.R.color.black_86p))
}
binding.loop.setTextColor(ContextCompat.getColor(this, if (loopLevel == 0) R.color.red_600 else android.support.wearable.R.color.black_86p))
if (singleBg.sgvString != "---") {
var rotationAngle = 0f // by default, show ? on the dial (? is at 0 degrees on the dial)
if (singleBg.glucoseUnits != "-") {
// ensure the glucose dial is the correct units
binding.glucoseDial.setImageResource(if (singleBg.glucoseUnits == "mmol") R.drawable.steampunk_dial_mmol else R.drawable.steampunk_dial_mgdl)
// convert the Sgv to degrees of rotation
rotationAngle =
if (singleBg.glucoseUnits == "mmol") stringToFloat(singleBg.sgvString) * 18f //convert to mg/dL, which is equivalent to degrees
else stringToFloat(singleBg.sgvString) // if glucose a value is received, use it to determine the amount of rotation of the dial.
}
if (rotationAngle > 330) rotationAngle = 330f // if the glucose value is higher than 330 then show "HIGH" on the dial. ("HIGH" is at 330 degrees on the dial)
if (rotationAngle != 0f && rotationAngle < 30) rotationAngle = 30f // if the glucose value is lower than 30 show "LOW" on the dial. ("LOW" is at 30 degrees on the dial)
if (lastEndDegrees == 0f) lastEndDegrees = rotationAngle
// rotate glucose dial
val rotate = RotateAnimation(lastEndDegrees, rotationAngle - lastEndDegrees, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f).apply {
fillAfter = true
interpolator = LinearInterpolator()
duration = 1
}
binding.glucoseDial.startAnimation(rotate)
lastEndDegrees = rotationAngle //store the final angle as a starting point for the next rotation.
}
// set the delta gauge and rotate the delta pointer
var deltaIsNegative = 1f // by default go clockwise
if (singleBg.avgDelta != "--") { // if a legitimate delta value is
// received,
// then...
if (singleBg.avgDelta[0] == '-') deltaIsNegative = -1f //if the delta is negative, go counter-clockwise
val absAvgDelta = stringToFloat(singleBg.avgDelta.substring(1)) //get rid of the sign so it can be converted to float.
var autoGranularity = "0" //auto-granularity off
// ensure the delta gauge is the right units and granularity
if (singleBg.glucoseUnits != "-") {
if (singleBg.glucoseUnits == "mmol") {
if (sp.getString("delta_granularity", "2") == "4") { //Auto granularity
autoGranularity =
when {
absAvgDelta < 0.3 -> "3" // high if below 0.3 mmol/l
absAvgDelta < 0.5 -> "2" // medium if below 0.5 mmol/l
else -> "1" // low (init)
}
}
if (sp.getString("delta_granularity", "2") == "1" || autoGranularity == "1") { //low
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mmol_10)
deltaRotationAngle = absAvgDelta * 30f
}
if (sp.getString("delta_granularity", "2") == "2" || autoGranularity == "2") { //medium
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mmol_05)
deltaRotationAngle = absAvgDelta * 60f
}
if (sp.getString("delta_granularity", "2") == "3" || autoGranularity == "3") { //high
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mmol_03)
deltaRotationAngle = absAvgDelta * 100f
}
} else {
if (sp.getString("delta_granularity", "2") == "4") { //Auto granularity
autoGranularity =
when {
absAvgDelta < 5 -> "3" // high if below 5 mg/dl
absAvgDelta < 10 -> "2" // medium if below 10 mg/dl
else -> "1" // low (init)
}
}
if (sp.getString("delta_granularity", "2") == "1" || autoGranularity == "1") { //low
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mgdl_20)
deltaRotationAngle = absAvgDelta * 1.5f
}
if (sp.getString("delta_granularity", "2") == "2" || autoGranularity == "2") { //medium
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mgdl_10)
deltaRotationAngle = absAvgDelta * 3f
}
if (sp.getString("delta_granularity", "2") == "3" || autoGranularity == "3") { //high
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mgdl_5)
deltaRotationAngle = absAvgDelta * 6f
}
}
}
if (deltaRotationAngle > 40) deltaRotationAngle = 40f
binding.deltaPointer.rotation = deltaRotationAngle * deltaIsNegative
}
// rotate the minute hand.
binding.minuteHand.rotation = TimeOfDay().minuteOfHour * 6f
// rotate the hour hand.
binding.hourHand.rotation = TimeOfDay().hourOfDay * 30f + TimeOfDay().minuteOfHour * 0.5f
setTextSizes()
binding.loop.setBackgroundResource(0)
highColor = ContextCompat.getColor(this, R.color.black)
lowColor = ContextCompat.getColor(this, R.color.black)
midColor = ContextCompat.getColor(this, R.color.black)
gridColor = ContextCompat.getColor(this, R.color.grey_steampunk)
basalBackgroundColor = ContextCompat.getColor(this, R.color.basal_dark)
basalCenterColor = ContextCompat.getColor(this, R.color.basal_dark)
pointSize = if (sp.getInt(R.string.key_chart_time_frame, 3) < 3) 2 else 1
setupCharts()
invalidate()
}
override fun setColorLowRes() {
setColorDark()
}
override fun setColorBright() {
setColorDark()
}
private fun setTextSizes() {
var fontSmall = 10f
var fontMedium = 11f
var fontLarge = 12f
if (bIsRound) {
fontSmall = 11f
fontMedium = 12f
fontLarge = 13f
}
// top row. large font unless text too big (i.e. detailedIOB)
binding.cob2.textSize = fontLarge
binding.basalRate.textSize = fontLarge
val fontIob = if (status.iobDetail.length < 7) fontLarge else fontSmall
binding.iob2.textSize = fontIob
// bottom row. font medium unless text too long (i.e. longer than 9' timestamp)
// always resize these fields together, for symmetry.
val font = if (binding.timestamp.text.length < 3 || binding.loop.text.length < 3) fontMedium else fontSmall
binding.loop.textSize = font
binding.timestamp.textSize = font
// if both batteries are shown, make them smaller.
val fontBat = if (sp.getBoolean(R.string.key_show_uploader_battery, true) && sp.getBoolean(R.string.key_show_rig_battery, false)) fontSmall else fontMedium
binding.uploaderBattery.textSize = fontBat
binding.rigBattery.textSize = fontBat
}
override fun changeChartTimeframe() {
var timeframe = sp.getInt(R.string.key_chart_time_frame, 3)
timeframe = timeframe % 5 + 1
pointSize = if (timeframe < 3) 2 else 1
sp.putString(R.string.key_chart_time_frame, timeframe.toString())
}
}

View file

@ -9,7 +9,6 @@ import app.aaps.wear.databinding.ActivityHome2Binding
import app.aaps.wear.databinding.ActivityHomeBinding import app.aaps.wear.databinding.ActivityHomeBinding
import app.aaps.wear.databinding.ActivityHomeLargeBinding import app.aaps.wear.databinding.ActivityHomeLargeBinding
import app.aaps.wear.databinding.ActivityNochartBinding import app.aaps.wear.databinding.ActivityNochartBinding
import app.aaps.wear.databinding.ActivitySteampunkBinding
/** /**
* WatchfaceViewAdapter binds all WatchFace variants shared attributes to one common view adapter. * WatchfaceViewAdapter binds all WatchFace variants shared attributes to one common view adapter.
@ -23,12 +22,11 @@ class WatchfaceViewAdapter(
cp: ActivityCockpitBinding? = null, cp: ActivityCockpitBinding? = null,
ds: ActivityDigitalstyleBinding? = null, ds: ActivityDigitalstyleBinding? = null,
nC: ActivityNochartBinding? = null, nC: ActivityNochartBinding? = null,
sP: ActivitySteampunkBinding? = null,
cU: ActivityCustomBinding? = null cU: ActivityCustomBinding? = null
) { ) {
init { init {
if (aL == null && a2 == null && aa == null && bC == null && cp == null && ds == null && nC == null && sP == null && cU == null) { if (aL == null && a2 == null && aa == null && bC == null && cp == null && ds == null && nC == null && cU == null) {
throw IllegalArgumentException("Require at least on Binding parameter") throw IllegalArgumentException("Require at least on Binding parameter")
} }
} }
@ -37,28 +35,28 @@ class WatchfaceViewAdapter(
// Required attributes // Required attributes
val mainLayout = val mainLayout =
aL?.mainLayout ?: a2?.mainLayout ?: aa?.mainLayout ?: bC?.mainLayout ?: bC?.mainLayout ?: cp?.mainLayout ?: ds?.mainLayout ?: nC?.mainLayout ?: sP?.mainLayout ?: cU?.mainLayout aL?.mainLayout ?: a2?.mainLayout ?: aa?.mainLayout ?: bC?.mainLayout ?: bC?.mainLayout ?: cp?.mainLayout ?: ds?.mainLayout ?: nC?.mainLayout ?: cU?.mainLayout
?: throw IllegalArgumentException(errorMessage) ?: throw IllegalArgumentException(errorMessage)
val timestamp = val timestamp =
aL?.timestamp ?: a2?.timestamp ?: aa?.timestamp ?: bC?.timestamp ?: bC?.timestamp ?: cp?.timestamp ?: ds?.timestamp ?: nC?.timestamp ?: sP?.timestamp ?: cU?.timestamp aL?.timestamp ?: a2?.timestamp ?: aa?.timestamp ?: bC?.timestamp ?: bC?.timestamp ?: cp?.timestamp ?: ds?.timestamp ?: nC?.timestamp ?: cU?.timestamp
?: throw IllegalArgumentException(errorMessage) ?: throw IllegalArgumentException(errorMessage)
val root = val root =
aL?.root ?: a2?.root ?: aa?.root ?: bC?.root ?: bC?.root ?: cp?.root ?: ds?.root ?: nC?.root ?: sP?.root ?: cU?.root aL?.root ?: a2?.root ?: aa?.root ?: bC?.root ?: bC?.root ?: cp?.root ?: ds?.root ?: nC?.root ?: cU?.root
?: throw IllegalArgumentException(errorMessage) ?: throw IllegalArgumentException(errorMessage)
// Optional attributes // Optional attributes
val sgv = aL?.sgv ?: a2?.sgv ?: aa?.sgv ?: bC?.sgv ?: bC?.sgv ?: cp?.sgv ?: ds?.sgv ?: nC?.sgv ?: cU?.sgv val sgv = aL?.sgv ?: a2?.sgv ?: aa?.sgv ?: bC?.sgv ?: bC?.sgv ?: cp?.sgv ?: ds?.sgv ?: nC?.sgv ?: cU?.sgv
val direction = aL?.direction ?: a2?.direction ?: aa?.direction ?: cp?.direction ?: ds?.direction val direction = aL?.direction ?: a2?.direction ?: aa?.direction ?: cp?.direction ?: ds?.direction
val loop = a2?.loop ?: cp?.loop ?: sP?.loop ?: cU?.loop val loop = a2?.loop ?: cp?.loop ?: cU?.loop
val delta = aL?.delta ?: a2?.delta ?: aa?.delta ?: bC?.delta ?: bC?.delta ?: cp?.delta ?: ds?.delta ?: nC?.delta ?: cU?.delta val delta = aL?.delta ?: a2?.delta ?: aa?.delta ?: bC?.delta ?: bC?.delta ?: cp?.delta ?: ds?.delta ?: nC?.delta ?: cU?.delta
val avgDelta = a2?.avgDelta ?: bC?.avgDelta ?: bC?.avgDelta ?: cp?.avgDelta ?: ds?.avgDelta ?: nC?.avgDelta ?: cU?.avgDelta val avgDelta = a2?.avgDelta ?: bC?.avgDelta ?: bC?.avgDelta ?: cp?.avgDelta ?: ds?.avgDelta ?: nC?.avgDelta ?: cU?.avgDelta
val uploaderBattery = aL?.uploaderBattery ?: a2?.uploaderBattery ?: aa?.uploaderBattery ?: cp?.uploaderBattery ?: ds?.uploaderBattery ?: sP?.uploaderBattery ?: cU?.uploaderBattery val uploaderBattery = aL?.uploaderBattery ?: a2?.uploaderBattery ?: aa?.uploaderBattery ?: cp?.uploaderBattery ?: ds?.uploaderBattery ?: cU?.uploaderBattery
val rigBattery = a2?.rigBattery ?: cp?.rigBattery ?: ds?.rigBattery ?: sP?.rigBattery ?: cU?.rigBattery val rigBattery = a2?.rigBattery ?: cp?.rigBattery ?: ds?.rigBattery ?: cU?.rigBattery
val basalRate = a2?.basalRate ?: cp?.basalRate ?: ds?.basalRate ?: sP?.basalRate ?: cU?.basalRate val basalRate = a2?.basalRate ?: cp?.basalRate ?: ds?.basalRate ?: cU?.basalRate
val bgi = a2?.bgi ?: ds?.bgi ?: cU?.bgi val bgi = a2?.bgi ?: ds?.bgi ?: cU?.bgi
val AAPSv2 = a2?.AAPSv2 ?: cp?.AAPSv2 ?: ds?.AAPSv2 ?: sP?.AAPSv2 ?: cU?.AAPSv2 val AAPSv2 = a2?.AAPSv2 ?: cp?.AAPSv2 ?: ds?.AAPSv2 ?: cU?.AAPSv2
val cob1 = a2?.cob1 ?: ds?.cob1 ?: cU?.cob1 val cob1 = a2?.cob1 ?: ds?.cob1 ?: cU?.cob1
val cob2 = a2?.cob2 ?: cp?.cob2 ?: ds?.cob2 ?: sP?.cob2 ?: cU?.cob2 val cob2 = a2?.cob2 ?: cp?.cob2 ?: ds?.cob2 ?: cU?.cob2
val time = aL?.time ?: a2?.time ?: aa?.time ?: bC?.time ?: bC?.time ?: cp?.time ?: nC?.time ?: cU?.time val time = aL?.time ?: a2?.time ?: aa?.time ?: bC?.time ?: bC?.time ?: cp?.time ?: nC?.time ?: cU?.time
val second = cU?.second val second = cU?.second
val minute = ds?.minute ?: cU?.minute val minute = ds?.minute ?: cU?.minute
@ -66,23 +64,21 @@ class WatchfaceViewAdapter(
val day = a2?.day ?: ds?.day ?: cU?.day val day = a2?.day ?: ds?.day ?: cU?.day
val month = a2?.month ?: ds?.month ?: cU?.month val month = a2?.month ?: ds?.month ?: cU?.month
val iob1 = a2?.iob1 ?: ds?.iob1 ?: cU?.iob1 val iob1 = a2?.iob1 ?: ds?.iob1 ?: cU?.iob1
val iob2 = a2?.iob2 ?: cp?.iob2 ?: ds?.iob2 ?: sP?.iob2 ?: cU?.iob2 val iob2 = a2?.iob2 ?: cp?.iob2 ?: ds?.iob2 ?: cU?.iob2
val chart = a2?.chart ?: aa?.chart ?: bC?.chart ?: bC?.chart ?: ds?.chart ?: sP?.chart ?: cU?.chart val chart = a2?.chart ?: aa?.chart ?: bC?.chart ?: bC?.chart ?: ds?.chart ?: cU?.chart
val status = aL?.status ?: aa?.status ?: bC?.status ?: bC?.status ?: nC?.status val status = aL?.status ?: aa?.status ?: bC?.status ?: bC?.status ?: nC?.status
val timePeriod = ds?.timePeriod ?: aL?.timePeriod ?: nC?.timePeriod ?: bC?.timePeriod ?: cU?.timePeriod val timePeriod = ds?.timePeriod ?: aL?.timePeriod ?: nC?.timePeriod ?: bC?.timePeriod ?: cU?.timePeriod
val dayName = ds?.dayName ?: cU?.dayName val dayName = ds?.dayName ?: cU?.dayName
val mainMenuTap = ds?.mainMenuTap ?: sP?.mainMenuTap val mainMenuTap = ds?.mainMenuTap
val chartZoomTap = ds?.chartZoomTap ?: sP?.chartZoomTap val chartZoomTap = ds?.chartZoomTap
val dateTime = ds?.dateTime ?: a2?.dateTime val dateTime = ds?.dateTime ?: a2?.dateTime
val weekNumber = ds?.weekNumber ?: cU?.weekNumber val weekNumber = ds?.weekNumber ?: cU?.weekNumber
// val minuteHand = sP?.minuteHand // val minuteHand = cU?.minuteHand
// val secondaryLayout = aL?.secondaryLayout ?: a2?.secondaryLayout ?: aa?.secondaryLayout ?: ds?.secondaryLayout ?: sP?.secondaryLayout // val secondaryLayout = aL?.secondaryLayout ?: a2?.secondaryLayout ?: aa?.secondaryLayout ?: ds?.secondaryLayout
// val tertiaryLayout = a2?.tertiaryLayout ?: sP?.tertiaryLayout // val tertiaryLayout = a2?.tertiaryLayout
// val highLight = cp?.highLight // val highLight = cp?.highLight
// val lowLight = cp?.lowLight // val lowLight = cp?.lowLight
// val deltaGauge = sP?.deltaPointer // val hourHand = cU?.hourHand
// val hourHand = sP?.hourHand
// val glucoseDial = sP?.glucoseDial
companion object { companion object {
@ -95,8 +91,7 @@ class WatchfaceViewAdapter(
is ActivityCockpitBinding -> WatchfaceViewAdapter(null, null, null, null, bindLayout) is ActivityCockpitBinding -> WatchfaceViewAdapter(null, null, null, null, bindLayout)
is ActivityDigitalstyleBinding -> WatchfaceViewAdapter(null, null, null, null, null, bindLayout) is ActivityDigitalstyleBinding -> WatchfaceViewAdapter(null, null, null, null, null, bindLayout)
is ActivityNochartBinding -> WatchfaceViewAdapter(null, null, null, null, null, null, bindLayout) is ActivityNochartBinding -> WatchfaceViewAdapter(null, null, null, null, null, null, bindLayout)
is ActivitySteampunkBinding -> WatchfaceViewAdapter(null, null, null, null, null, null, null, bindLayout) is ActivityCustomBinding -> WatchfaceViewAdapter(null, null, null, null, null, null, null, bindLayout)
is ActivityCustomBinding -> WatchfaceViewAdapter(null, null, null, null, null, null, null, null, bindLayout)
else -> throw IllegalArgumentException("ViewBinding is not implement in WatchfaceViewAdapter") else -> throw IllegalArgumentException("ViewBinding is not implement in WatchfaceViewAdapter")
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

View file

@ -1,379 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".watchfaces.SteampunkWatchface">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/glucose_dial"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:importantForAccessibility="no"
android:src="@drawable/steampunk_dial_mgdl" />
</LinearLayout>
<LinearLayout
android:id="@+id/secondary_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@drawable/steampunk_gauge_mgdl_20"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:id="@+id/delta_pointer"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.69"
android:gravity="center"
android:src="@drawable/steampunk_pointer" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
android:id="@+id/main_menu_tap"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.7"
android:orientation="vertical"
android:weightSum="1">
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.05"
tools:ignore="NestedWeights" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.26"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="1">
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
android:gravity="center"
android:textSize="11sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.165"
android:orientation="horizontal">
<TextView
android:id="@+id/cob2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="7dp"
android:rotation="-28"
android:text="@string/no_cob_g"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.27"
android:orientation="horizontal">
<TextView
android:id="@+id/basalRate"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingBottom="14dp"
android:rotation="0"
android:text="@string/no_tmp_basal_u_h"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.165"
android:orientation="horizontal">
<TextView
android:id="@+id/iob2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="6dp"
android:rotation="28"
android:text="@string/no_iob_u"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
android:gravity="center"
android:textSize="11sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/chart_zoom_tap"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.27"
android:orientation="horizontal"
android:weightSum="1">
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.2"
tools:ignore="NestedWeights" />
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.55" />
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.25"
android:orientation="horizontal" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03" />
</LinearLayout>
<LinearLayout
android:id="@+id/tertiary_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.15" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.21"
android:baselineAligned="false"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="1">
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.32"
tools:ignore="NestedWeights" />
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.12"
android:orientation="horizontal">
<TextView
android:id="@+id/loop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingStart="0dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:rotation="-24"
android:text="-'"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.12"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/rig_battery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/uploader_battery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.12"
android:orientation="horizontal">
<TextView
android:id="@+id/timestamp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingStart="10dp"
android:paddingTop="8dp"
android:paddingEnd="0dp"
android:rotation="24"
android:text="-'"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.32" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.64" />
</LinearLayout>
<LinearLayout
android:id="@+id/cover_plate_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/steampunk_cover_plate"
android:orientation="vertical" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:id="@+id/hour_hand"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_weight="0.3"
android:orientation="vertical"
android:rotation="0"
android:src="@drawable/steampunk_hour_hand" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:id="@+id/minute_hand"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_weight="0.3"
android:orientation="vertical"
android:src="@drawable/steampunk_minute_hand" />
</LinearLayout>
<View
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone" />
</RelativeLayout>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ListPreference
android:defaultValue="2"
android:entries="@array/delta_granularity"
android:entryValues="@array/delta_granularity_values"
android:key="delta_granularity"
android:summary="Delta Granularity (Steampunk)"
android:title="@string/pref_delta_granularity" />
<CheckBoxPreference
android:defaultValue="false"
android:key="@string/key_vibrate_hourly"
android:title="@string/pref_vibrate_hourly"
app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" />
<ListPreference
android:defaultValue="off"
android:entries="@array/watchface_simplify_ui_name"
android:entryValues="@array/watchface_simplify_ui_values"
android:key="@string/key_simplify_ui"
android:summary="@string/pref_simplify_ui_sum"
android:title="@string/pref_simplify_ui" />
</PreferenceScreen>