chore: wear wf ConstraintLayout and depended dimensions

This commit is contained in:
Andries Smit 2022-12-28 13:59:15 +01:00
parent ef7ebb8c6e
commit 0fa80b5ffe
22 changed files with 412 additions and 699 deletions

View file

@ -52,7 +52,7 @@ class AapsV2Watchface : BaseWatchFace() {
binding.rigBattery.setTextColor(dividerTxtColor) binding.rigBattery.setTextColor(dividerTxtColor)
binding.delta.setTextColor(dividerTxtColor) binding.delta.setTextColor(dividerTxtColor)
binding.avgDelta.setTextColor(dividerTxtColor) binding.avgDelta.setTextColor(dividerTxtColor)
binding.basalRate?.setTextColor(dividerTxtColor) binding.basalRate.setTextColor(dividerTxtColor)
binding.bgi.setTextColor(dividerTxtColor) binding.bgi.setTextColor(dividerTxtColor)
when (loopLevel) { when (loopLevel) {
-1 -> binding.loop.setBackgroundResource(R.drawable.loop_grey_25) -1 -> binding.loop.setBackgroundResource(R.drawable.loop_grey_25)
@ -85,7 +85,7 @@ class AapsV2Watchface : BaseWatchFace() {
binding.avgDelta.setTextColor(dividerTxtColor) binding.avgDelta.setTextColor(dividerTxtColor)
binding.rigBattery.setTextColor(dividerTxtColor) binding.rigBattery.setTextColor(dividerTxtColor)
binding.uploaderBattery.setTextColor(dividerTxtColor) binding.uploaderBattery.setTextColor(dividerTxtColor)
binding.basalRate?.setTextColor(dividerTxtColor) binding.basalRate.setTextColor(dividerTxtColor)
binding.bgi.setTextColor(dividerTxtColor) binding.bgi.setTextColor(dividerTxtColor)
binding.iob1.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor)) binding.iob1.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor))
binding.iob2.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor)) binding.iob2.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor))
@ -138,7 +138,7 @@ class AapsV2Watchface : BaseWatchFace() {
binding.rigBattery.setTextColor(dividerTxtColor) binding.rigBattery.setTextColor(dividerTxtColor)
binding.delta.setTextColor(dividerTxtColor) binding.delta.setTextColor(dividerTxtColor)
binding.avgDelta.setTextColor(dividerTxtColor) binding.avgDelta.setTextColor(dividerTxtColor)
binding.basalRate?.setTextColor(dividerTxtColor) binding.basalRate.setTextColor(dividerTxtColor)
binding.bgi.setTextColor(dividerTxtColor) binding.bgi.setTextColor(dividerTxtColor)
when (loopLevel) { when (loopLevel) {
-1 -> binding.loop.setBackgroundResource(R.drawable.loop_grey_25) -1 -> binding.loop.setBackgroundResource(R.drawable.loop_grey_25)

View file

@ -19,6 +19,7 @@ class AapsWatchface : BaseWatchFace() {
} }
override fun setColorDark() { override fun setColorDark() {
binding.mainLayout.setBackgroundColor(ContextCompat.getColor(this, R.color.dark_background))
binding.secondaryLayout.setBackgroundColor(ContextCompat.getColor(this, if (dividerMatchesBg) R.color.dark_background else R.color.dark_statusView)) binding.secondaryLayout.setBackgroundColor(ContextCompat.getColor(this, if (dividerMatchesBg) R.color.dark_background else R.color.dark_statusView))
binding.time.setTextColor(ContextCompat.getColor(this, R.color.dark_mTime)) binding.time.setTextColor(ContextCompat.getColor(this, R.color.dark_mTime))
val color = when (singleBg.sgvLevel) { val color = when (singleBg.sgvLevel) {

View file

@ -9,7 +9,6 @@ import androidx.viewbinding.ViewBinding
import com.ustwo.clockwise.common.WatchMode import com.ustwo.clockwise.common.WatchMode
import info.nightscout.androidaps.R import info.nightscout.androidaps.R
import info.nightscout.androidaps.databinding.ActivityBigchartBinding import info.nightscout.androidaps.databinding.ActivityBigchartBinding
import info.nightscout.androidaps.databinding.ActivityBigchartSmallBinding
import info.nightscout.androidaps.watchfaces.utils.BaseWatchFace import info.nightscout.androidaps.watchfaces.utils.BaseWatchFace
import info.nightscout.androidaps.watchfaces.utils.WatchfaceViewAdapter import info.nightscout.androidaps.watchfaces.utils.WatchfaceViewAdapter
@ -18,11 +17,6 @@ class BigChartWatchface : BaseWatchFace() {
private lateinit var binding: WatchfaceViewAdapter private lateinit var binding: WatchfaceViewAdapter
override fun inflateLayout(inflater: LayoutInflater): ViewBinding { override fun inflateLayout(inflater: LayoutInflater): ViewBinding {
if (resources.displayMetrics.widthPixels < SCREEN_SIZE_SMALL || resources.displayMetrics.heightPixels < SCREEN_SIZE_SMALL) {
val layoutBinding = ActivityBigchartSmallBinding.inflate(inflater)
binding = WatchfaceViewAdapter.getBinding(layoutBinding)
return layoutBinding
}
val layoutBinding = ActivityBigchartBinding.inflate(inflater) val layoutBinding = ActivityBigchartBinding.inflate(inflater)
binding = WatchfaceViewAdapter.getBinding(layoutBinding) binding = WatchfaceViewAdapter.getBinding(layoutBinding)
return layoutBinding return layoutBinding
@ -42,6 +36,7 @@ class BigChartWatchface : BaseWatchFace() {
binding.delta?.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor)) binding.delta?.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor))
binding.avgDelta?.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor)) binding.avgDelta?.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor))
binding.timestamp.setTextColor(ContextCompat.getColor(this, R.color.dark_Timestamp)) binding.timestamp.setTextColor(ContextCompat.getColor(this, R.color.dark_Timestamp))
binding.timePeriod?.setTextColor(ContextCompat.getColor(this, R.color.dark_Timestamp))
highColor = ContextCompat.getColor(this, R.color.dark_midColor) highColor = ContextCompat.getColor(this, R.color.dark_midColor)
lowColor = ContextCompat.getColor(this, R.color.dark_midColor) lowColor = ContextCompat.getColor(this, R.color.dark_midColor)
@ -69,6 +64,7 @@ class BigChartWatchface : BaseWatchFace() {
val colorTime = if (ageLevel == 1) R.color.dark_Timestamp else R.color.dark_TimestampOld val colorTime = if (ageLevel == 1) R.color.dark_Timestamp else R.color.dark_TimestampOld
binding.timestamp.setTextColor(ContextCompat.getColor(this, colorTime)) binding.timestamp.setTextColor(ContextCompat.getColor(this, colorTime))
binding.timePeriod?.setTextColor(ContextCompat.getColor(this, colorTime))
highColor = ContextCompat.getColor(this, R.color.dark_highColor) highColor = ContextCompat.getColor(this, R.color.dark_highColor)
lowColor = ContextCompat.getColor(this, R.color.dark_lowColor) lowColor = ContextCompat.getColor(this, R.color.dark_lowColor)
@ -97,6 +93,7 @@ class BigChartWatchface : BaseWatchFace() {
val colorTime = if (ageLevel == 1) R.color.light_mTimestamp1 else R.color.light_mTimestamp val colorTime = if (ageLevel == 1) R.color.light_mTimestamp1 else R.color.light_mTimestamp
binding.timestamp.setTextColor(ContextCompat.getColor(this, colorTime)) binding.timestamp.setTextColor(ContextCompat.getColor(this, colorTime))
binding.timePeriod?.setTextColor(ContextCompat.getColor(this, colorTime))
highColor = ContextCompat.getColor(this, R.color.light_highColor) highColor = ContextCompat.getColor(this, R.color.light_highColor)
lowColor = ContextCompat.getColor(this, R.color.light_lowColor) lowColor = ContextCompat.getColor(this, R.color.light_lowColor)

View file

@ -67,18 +67,17 @@ class DigitalStyleWatchface : BaseWatchFace() {
/* frame styles*/ /* frame styles*/
val mShapesElements = layoutView?.findViewById<LinearLayout>(R.id.shapes_elements) val mShapesElements = layoutView?.findViewById<LinearLayout>(R.id.shapes_elements)
if (mShapesElements != null) { if (mShapesElements != null) {
val displayFormatType = if (mShapesElements.contentDescription.toString().startsWith("round")) "round" else "rect"
val displayStyle = sp.getString(R.string.key_digital_style_frame_style, "full") val displayStyle = sp.getString(R.string.key_digital_style_frame_style, "full")
val displayFrameColor = sp.getString(R.string.key_digital_style_frame_color, "red") val displayFrameColor = sp.getString(R.string.key_digital_style_frame_color, "red")
val displayFrameColorSaturation = sp.getString(R.string.key_digital_style_frame_color_saturation, "500") val displayFrameColorSaturation = sp.getString(R.string.key_digital_style_frame_color_saturation, "500")
val displayFrameColorOpacity = sp.getString(R.string.key_digital_style_frame_color_opacity, "1") val displayFrameColorOpacity = sp.getString(R.string.key_digital_style_frame_color_opacity, "1")
// Load image with shapes // Load image with shapes
val styleDrawableName = "digitalstyle_bg_" + displayStyle + "_" + displayFormatType val styleDrawableName = "digital_style_bg_" + displayStyle
try { try {
mShapesElements.background = ContextCompat.getDrawable(this, resources.getIdentifier(styleDrawableName, "drawable", this.packageName)) mShapesElements.background = ContextCompat.getDrawable(this, resources.getIdentifier(styleDrawableName, "drawable", this.packageName))
} catch (e: Exception) { } catch (e: Exception) {
aapsLogger.error("digitalstyle_frameStyle", "RESOURCE NOT FOUND >> $styleDrawableName") aapsLogger.error("digital_style_frameStyle", "RESOURCE NOT FOUND >> $styleDrawableName")
} }
// set background-tint-color // set background-tint-color
@ -86,13 +85,13 @@ class DigitalStyleWatchface : BaseWatchFace() {
mShapesElements.backgroundTintList = null mShapesElements.backgroundTintList = null
} else { } else {
val strColorName = if (displayFrameColor == "white" || displayFrameColor == "black") displayFrameColor else displayFrameColor + "_" + displayFrameColorSaturation val strColorName = if (displayFrameColor == "white" || displayFrameColor == "black") displayFrameColor else displayFrameColor + "_" + displayFrameColorSaturation
aapsLogger.debug(LTag.WEAR, "digitalstyle_strColorName", strColorName) aapsLogger.debug(LTag.WEAR, "digital_style_strColorName", strColorName)
try { try {
val colorStateList = ContextCompat.getColorStateList(this, resources.getIdentifier(strColorName, "color", this.packageName)) val colorStateList = ContextCompat.getColorStateList(this, resources.getIdentifier(strColorName, "color", this.packageName))
mShapesElements.backgroundTintList = colorStateList mShapesElements.backgroundTintList = colorStateList
} catch (e: Exception) { } catch (e: Exception) {
mShapesElements.backgroundTintList = null mShapesElements.backgroundTintList = null
aapsLogger.error("digitalstyle_colorName", "COLOR NOT FOUND >> $strColorName") aapsLogger.error("digital_style_colorName", "COLOR NOT FOUND >> $strColorName")
} }
} }

View file

@ -6,9 +6,7 @@ import androidx.viewbinding.ViewBinding
import com.ustwo.clockwise.common.WatchMode import com.ustwo.clockwise.common.WatchMode
import info.nightscout.androidaps.R import info.nightscout.androidaps.R
import info.nightscout.androidaps.databinding.ActivityBigchartBinding import info.nightscout.androidaps.databinding.ActivityBigchartBinding
import info.nightscout.androidaps.databinding.ActivityBigchartSmallBinding
import info.nightscout.androidaps.databinding.ActivityNochartBinding import info.nightscout.androidaps.databinding.ActivityNochartBinding
import info.nightscout.androidaps.databinding.ActivityNochartSmallBinding
import info.nightscout.androidaps.watchfaces.utils.BaseWatchFace import info.nightscout.androidaps.watchfaces.utils.BaseWatchFace
import info.nightscout.androidaps.watchfaces.utils.WatchfaceViewAdapter import info.nightscout.androidaps.watchfaces.utils.WatchfaceViewAdapter
@ -17,11 +15,6 @@ class NoChartWatchface : BaseWatchFace() {
private lateinit var binding: WatchfaceViewAdapter private lateinit var binding: WatchfaceViewAdapter
override fun inflateLayout(inflater: LayoutInflater): ViewBinding { override fun inflateLayout(inflater: LayoutInflater): ViewBinding {
if (resources.displayMetrics.widthPixels < SCREEN_SIZE_SMALL || resources.displayMetrics.heightPixels < SCREEN_SIZE_SMALL) {
val layoutBinding = ActivityNochartSmallBinding.inflate(inflater)
binding = WatchfaceViewAdapter.getBinding(layoutBinding)
return layoutBinding
}
val layoutBinding = ActivityNochartBinding.inflate(inflater) val layoutBinding = ActivityNochartBinding.inflate(inflater)
binding = WatchfaceViewAdapter.getBinding(layoutBinding) binding = WatchfaceViewAdapter.getBinding(layoutBinding)
return layoutBinding return layoutBinding
@ -35,6 +28,7 @@ class NoChartWatchface : BaseWatchFace() {
binding.delta?.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor)) binding.delta?.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor))
binding.avgDelta?.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor)) binding.avgDelta?.setTextColor(ContextCompat.getColor(this, R.color.dark_midColor))
binding.timestamp.setTextColor(ContextCompat.getColor(this, R.color.dark_Timestamp)) binding.timestamp.setTextColor(ContextCompat.getColor(this, R.color.dark_Timestamp))
binding.timePeriod?.setTextColor(ContextCompat.getColor(this, R.color.dark_Timestamp))
} }
override fun setColorDark() { override fun setColorDark() {
@ -52,6 +46,7 @@ class NoChartWatchface : BaseWatchFace() {
binding.avgDelta?.setTextColor(ContextCompat.getColor(this, color)) binding.avgDelta?.setTextColor(ContextCompat.getColor(this, color))
val colorTime = if (ageLevel == 1) R.color.dark_Timestamp else R.color.dark_TimestampOld val colorTime = if (ageLevel == 1) R.color.dark_Timestamp else R.color.dark_TimestampOld
binding.timestamp.setTextColor(ContextCompat.getColor(this, colorTime)) binding.timestamp.setTextColor(ContextCompat.getColor(this, colorTime))
binding.timePeriod?.setTextColor(ContextCompat.getColor(this, colorTime))
} }
override fun setColorBright() { override fun setColorBright() {
@ -70,6 +65,7 @@ class NoChartWatchface : BaseWatchFace() {
binding.avgDelta?.setTextColor(ContextCompat.getColor(this, color)) binding.avgDelta?.setTextColor(ContextCompat.getColor(this, color))
val colorTime = if (ageLevel == 1) R.color.light_mTimestamp1 else R.color.light_mTimestamp val colorTime = if (ageLevel == 1) R.color.light_mTimestamp1 else R.color.light_mTimestamp
binding.timestamp.setTextColor(ContextCompat.getColor(this, colorTime)) binding.timestamp.setTextColor(ContextCompat.getColor(this, colorTime))
binding.timePeriod?.setTextColor(ContextCompat.getColor(this, colorTime))
} else { } else {
setColorDark() setColorDark()

View file

@ -423,7 +423,7 @@ abstract class BaseWatchFace : WatchFace() {
} }
private fun setDateAndTime() { private fun setDateAndTime() {
binding.time?.text = dateUtil.timeString() binding.time?.text = if(binding.timePeriod == null) dateUtil.timeString() else dateUtil.hourString() + ":" + dateUtil.minuteString()
binding.hour?.text = dateUtil.hourString() binding.hour?.text = dateUtil.hourString()
binding.minute?.text = dateUtil.minuteString() binding.minute?.text = dateUtil.minuteString()
binding.dateTime?.visibility = sp.getBoolean(R.string.key_show_date, false).toVisibility() binding.dateTime?.visibility = sp.getBoolean(R.string.key_show_date, false).toVisibility()
@ -524,6 +524,5 @@ abstract class BaseWatchFace : WatchFace() {
var iFilter = IntentFilter(Intent.ACTION_BATTERY_CHANGED) var iFilter = IntentFilter(Intent.ACTION_BATTERY_CHANGED)
val NORMAL_TYPEFACE: Typeface = Typeface.create(Typeface.SANS_SERIF, Typeface.NORMAL) val NORMAL_TYPEFACE: Typeface = Typeface.create(Typeface.SANS_SERIF, Typeface.NORMAL)
val BOLD_TYPEFACE: Typeface = Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD) val BOLD_TYPEFACE: Typeface = Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD)
const val SCREEN_SIZE_SMALL = 280
} }
} }

View file

@ -5,7 +5,6 @@ import info.nightscout.androidaps.databinding.ActivityHomeLargeBinding
import info.nightscout.androidaps.databinding.ActivityHome2Binding import info.nightscout.androidaps.databinding.ActivityHome2Binding
import info.nightscout.androidaps.databinding.ActivityHomeBinding import info.nightscout.androidaps.databinding.ActivityHomeBinding
import info.nightscout.androidaps.databinding.ActivityBigchartBinding import info.nightscout.androidaps.databinding.ActivityBigchartBinding
import info.nightscout.androidaps.databinding.ActivityBigchartSmallBinding
import info.nightscout.androidaps.databinding.ActivityCockpitBinding import info.nightscout.androidaps.databinding.ActivityCockpitBinding
import info.nightscout.androidaps.databinding.ActivityDigitalstyleBinding import info.nightscout.androidaps.databinding.ActivityDigitalstyleBinding
import info.nightscout.androidaps.databinding.ActivityNochartBinding import info.nightscout.androidaps.databinding.ActivityNochartBinding
@ -20,7 +19,6 @@ class WatchfaceViewAdapter(
a2: ActivityHome2Binding? = null, a2: ActivityHome2Binding? = null,
aa: ActivityHomeBinding? = null, aa: ActivityHomeBinding? = null,
bC: ActivityBigchartBinding? = null, bC: ActivityBigchartBinding? = null,
bCs: ActivityBigchartSmallBinding? = null,
cp: ActivityCockpitBinding? = null, cp: ActivityCockpitBinding? = null,
ds: ActivityDigitalstyleBinding? = null, ds: ActivityDigitalstyleBinding? = null,
nC: ActivityNochartBinding? = null, nC: ActivityNochartBinding? = null,
@ -28,7 +26,7 @@ class WatchfaceViewAdapter(
) { ) {
init { init {
if (aL == null && a2 == null && aa == null && bC == null && bCs == null && cp == null && ds == null && nC == null && sP == null) { if (aL == null && a2 == null && aa == null && bC == null && cp == null && ds == null && nC == null && sP == null) {
throw IllegalArgumentException("Require at least on Binding parameter") throw IllegalArgumentException("Require at least on Binding parameter")
} }
} }
@ -67,7 +65,7 @@ class WatchfaceViewAdapter(
val iob2 = a2?.iob2 ?: cp?.iob2 ?: ds?.iob2 ?: sP?.iob2 val iob2 = a2?.iob2 ?: cp?.iob2 ?: ds?.iob2 ?: sP?.iob2
val chart = a2?.chart ?: aa?.chart ?: bC?.chart ?: bC?.chart ?: ds?.chart ?: sP?.chart val chart = a2?.chart ?: aa?.chart ?: bC?.chart ?: bC?.chart ?: ds?.chart ?: sP?.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 val timePeriod = ds?.timePeriod ?: aL?.timePeriod ?: nC?.timePeriod ?: bC?.timePeriod
val dayName = ds?.dayName val dayName = ds?.dayName
val mainMenuTap = ds?.mainMenuTap ?: sP?.mainMenuTap val mainMenuTap = ds?.mainMenuTap ?: sP?.mainMenuTap
val chartZoomTap = ds?.chartZoomTap ?: sP?.chartZoomTap val chartZoomTap = ds?.chartZoomTap ?: sP?.chartZoomTap
@ -89,11 +87,10 @@ class WatchfaceViewAdapter(
is ActivityHome2Binding -> WatchfaceViewAdapter(null, bindLayout) is ActivityHome2Binding -> WatchfaceViewAdapter(null, bindLayout)
is ActivityHomeBinding -> WatchfaceViewAdapter(null, null, bindLayout) is ActivityHomeBinding -> WatchfaceViewAdapter(null, null, bindLayout)
is ActivityBigchartBinding -> WatchfaceViewAdapter(null, null, null, bindLayout) is ActivityBigchartBinding -> WatchfaceViewAdapter(null, null, null, bindLayout)
is ActivityBigchartSmallBinding -> WatchfaceViewAdapter(null, null, null, null, bindLayout) is ActivityCockpitBinding -> WatchfaceViewAdapter(null, null, null, null, bindLayout)
is ActivityCockpitBinding -> WatchfaceViewAdapter(null, null, null, null, null, bindLayout) is ActivityDigitalstyleBinding -> WatchfaceViewAdapter(null, null, null, null, null, bindLayout)
is ActivityDigitalstyleBinding -> WatchfaceViewAdapter(null, 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, null, bindLayout) is ActivitySteampunkBinding -> WatchfaceViewAdapter(null, null, null, null, null, null, null, bindLayout)
is ActivitySteampunkBinding -> 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")
} }
} }

View file

@ -11,11 +11,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_margin="10sp" android:layout_margin="10dp"
android:background="@drawable/circle" android:background="@drawable/circle"
android:backgroundTint="@color/white" android:backgroundTint="@color/white"
android:contentDescription="@string/action_confirm" android:contentDescription="@string/action_confirm"
android:padding="25sp" android:padding="25dp"
android:src="@drawable/ic_confirm" android:src="@drawable/ic_confirm"
app:tint="@color/white" /> app:tint="@color/white" />

View file

@ -1,60 +1,46 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout" android:id="@+id/main_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black"
android:orientation="vertical" android:orientation="vertical"
android:textAlignment="center" android:textAlignment="center"
tools:context=".watchfaces.AapsWatchface" tools:context=".watchfaces.BigChartWatchface">
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout <LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="-2dp" app:layout_constraintStart_toStartOf="parent"
android:gravity="center_horizontal" app:layout_constraintTop_toTopOf="parent">
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAlignment="center">
<TextView <TextView
android:id="@+id/delta" android:id="@+id/delta"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_marginEnd="5dp" android:gravity="bottom"
android:gravity="center_horizontal|bottom" android:textSize="@dimen/watch_face_big_chart_delta_text_size"
android:text="---" tools:text="---" />
android:textColor="@color/white"
android:textSize="30sp"
tools:ignore="HardcodedText" />
<TextView <TextView
android:id="@+id/sgv" android:id="@+id/sgv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_marginHorizontal="4dp"
android:gravity="center_horizontal" android:textSize="@dimen/watch_face_big_chart_svg_text_size"
android:text="---" tools:text="---" />
android:textColor="@color/white"
android:textSize="41sp"
tools:ignore="HardcodedText" />
<TextView <TextView
android:id="@+id/avg_delta" android:id="@+id/avg_delta"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_marginStart="5dp" android:textSize="@dimen/watch_face_big_chart_delta_text_size"
android:gravity="center_horizontal|bottom" tools:text="---" />
android:text="---"
android:textColor="@color/white"
android:textSize="30sp"
tools:ignore="HardcodedText" />
</LinearLayout> </LinearLayout>
@ -62,46 +48,63 @@
android:id="@+id/chart" android:id="@+id/chart"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_gravity="bottom" app:layout_constraintBottom_toTopOf="@+id/status"
android:layout_weight="1" app:layout_constraintTop_toBottomOf="@+id/linearLayout3" />
android:gravity="center_horizontal" />
<TextView <TextView
android:id="@+id/status" android:id="@+id/status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_marginBottom="-5dp"
android:textAlignment="center" android:textSize="@dimen/watch_face_status_text_size"
android:textColor="@color/white" app:layout_constraintBottom_toTopOf="@+id/linearLayout2"
android:textSize="18sp" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:text="E xU/h IOB: x (x+x)" /> tools:text="E xU/h IOB: x (x+x)" />
<LinearLayout <LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="horizontal"> android:paddingBottom="6dp"
app:layout_constraintBottom_toBottomOf="parent">
<TextView <TextView
android:id="@+id/time" android:id="@+id/time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp" android:layout_marginEnd="5dp"
android:textColor="@color/white" android:textSize="@dimen/watch_face_time_text_size"
android:textSize="35sp"
tools:text="12:00" /> tools:text="12:00" />
<TextView <LinearLayout
android:id="@+id/timestamp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:orientation="vertical">
android:text="-- '"
android:textColor="@color/white" <TextView
android:textSize="26sp" android:id="@+id/timestamp"
tools:ignore="HardcodedText" /> android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:maxLines="1"
android:textSize="@dimen/watch_face_timestamp_text_size"
tools:text="5'" />
<TextView
android:id="@+id/timePeriod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_marginTop="-4dp"
android:textSize="@dimen/watch_face_time_period_text_size"
android:textStyle="bold"
tools:text="AM" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,113 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:background="@color/black"
android:orientation="vertical"
android:textAlignment="center"
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAlignment="center">
<TextView
android:id="@+id/delta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal|center"
android:layout_marginEnd="5dp"
android:gravity="center_horizontal|bottom"
android:text="---"
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="---"
android:textColor="@color/white"
android:textSize="34sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avg_delta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal|center"
android:layout_marginStart="5dp"
android:gravity="center_horizontal|bottom"
android:text="---"
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5sp"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="18sp"
tools:text="E xU/h IOB: x (x+x)" />
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="bottom"
android:layout_weight="1"
android:gravity="center_horizontal" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-5sp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp"
android:paddingTop="-5sp"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="34sp"
tools:text="12:00" />
<TextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal|center"
android:text="--'"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>

View file

@ -6,7 +6,8 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:orientation="vertical"> android:orientation="vertical"
tools:context=".watchfaces.CircleWatchface">
<TextView <TextView
android:id="@+id/agoString" android:id="@+id/agoString"

View file

@ -5,9 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/airplane_cockpit_outside_clouds" android:background="@drawable/airplane_cockpit_outside_clouds"
tools:context=".watchfaces.CockpitWatchface" tools:context=".watchfaces.CockpitWatchface">
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<LinearLayout <LinearLayout
android:id="@+id/inside" android:id="@+id/inside"

View file

@ -5,18 +5,15 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black" android:background="@color/black"
tools:deviceIds="wear_round" tools:context=".watchfaces.DigitalStyleWatchface">
tools:ignore="MissingDefaultResource">
<!-- background-image with shapes elements--> <!-- background-image with shapes elements-->
<LinearLayout <LinearLayout
android:id="@+id/shapes_elements" android:id="@+id/shapes_elements"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/digitalstyle_bg_full_round" android:background="@drawable/digital_style_bg_full"
android:contentDescription="round-shape-elements" android:orientation="horizontal" />
android:orientation="horizontal"
tools:ignore="HardcodedText" />
<!-- root-element--> <!-- root-element-->
<LinearLayout <LinearLayout
@ -66,6 +63,7 @@
android:id="@+id/cob1" android:id="@+id/cob1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginTop="1dp"
android:layout_weight="2" android:layout_weight="2"
android:fontFamily="@font/roboto_slab_light" android:fontFamily="@font/roboto_slab_light"
android:gravity="bottom|center_horizontal" android:gravity="bottom|center_horizontal"
@ -78,6 +76,7 @@
android:id="@+id/cob2" android:id="@+id/cob2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginTop="-1dp"
android:layout_weight="3" android:layout_weight="3"
android:fontFamily="@font/roboto_slab_light" android:fontFamily="@font/roboto_slab_light"
android:gravity="top|center_horizontal" android:gravity="top|center_horizontal"
@ -85,7 +84,7 @@
android:lines="1" android:lines="1"
android:text="@string/cob_000g" android:text="@string/cob_000g"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" /> android:textSize="@dimen/watch_face_digital_sub_text_size" />
</LinearLayout> </LinearLayout>
@ -150,7 +149,7 @@
android:text="--" android:text="--"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp" android:textSize="@dimen/watch_face_digital_direction_text_size"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
@ -163,9 +162,10 @@
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:layout_weight="3" android:layout_weight="3"
android:fontFamily="sans-serif-condensed-light" android:fontFamily="sans-serif-condensed-light"
android:maxLines="1"
android:text="--'" android:text="--'"
android:textColor="@color/light_grey" android:textColor="@color/light_grey"
android:textSize="10sp" android:textSize="@dimen/watch_face_digital_timestamp_text_size"
tools:ignore="HardcodedText,SmallSp" /> tools:ignore="HardcodedText,SmallSp" />
<View <View
@ -196,7 +196,7 @@
android:lines="1" android:lines="1"
android:text="@string/svg_00_0" android:text="@string/svg_00_0"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="20sp" android:textSize="@dimen/watch_face_digital_svg_text_size"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
@ -240,6 +240,7 @@
android:id="@+id/iob1" android:id="@+id/iob1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginTop="1dp"
android:layout_weight="2" android:layout_weight="2"
android:fontFamily="@font/roboto_slab_light" android:fontFamily="@font/roboto_slab_light"
android:gravity="bottom|center_horizontal" android:gravity="bottom|center_horizontal"
@ -252,14 +253,16 @@
android:id="@+id/iob2" android:id="@+id/iob2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginTop="-1dp"
android:layout_weight="3" android:layout_weight="3"
android:fontFamily="@font/roboto_slab_light" android:fontFamily="@font/roboto_slab_light"
android:gravity="top|center_horizontal" android:gravity="top|center_horizontal"
android:letterSpacing="-0.075" android:letterSpacing="-0.075"
android:lines="1" android:lines="1"
android:text="@string/iob_0_00u" android:text="@string/iob_0_00u"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" /> android:textSize="@dimen/watch_face_digital_sub_text_size" />
</LinearLayout> </LinearLayout>
@ -342,7 +345,6 @@
android:textColor="@color/light_grey" android:textColor="@color/light_grey"
android:textFontWeight="400" android:textFontWeight="400"
android:textSize="18sp" android:textSize="18sp"
android:visibility="gone"
tools:text="ww" /> tools:text="ww" />
<View <View
@ -439,8 +441,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="start" android:layout_gravity="start"
android:layout_marginStart="6sp" android:layout_marginStart="6dp"
android:layout_marginBottom="-8sp" android:layout_marginTop="-2dp"
android:layout_marginBottom="-8dp"
android:fontFamily="@font/roboto_condensed_bold" android:fontFamily="@font/roboto_condensed_bold"
android:textColor="@color/light_grey" android:textColor="@color/light_grey"
android:textSize="26sp" android:textSize="26sp"
@ -452,7 +455,7 @@
android:id="@+id/timePeriod" android:id="@+id/timePeriod"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8sp" android:layout_marginStart="8dp"
android:fontFamily="@font/roboto_condensed_bold" android:fontFamily="@font/roboto_condensed_bold"
android:gravity="top" android:gravity="top"
android:textColor="@color/light_grey" android:textColor="@color/light_grey"

View file

@ -1,78 +1,51 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout" android:id="@+id/main_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black" tools:context=".watchfaces.AapsWatchface">
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1"
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:id="@+id/linearLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" app:layout_constraintBottom_toTopOf="@+id/secondary_layout"
android:layout_marginTop="-5dp" app:layout_constraintEnd_toEndOf="parent"
android:gravity="center_horizontal" app:layout_constraintStart_toStartOf="parent">
android:orientation="horizontal"
android:paddingTop="15dp"
android:textAlignment="center"
android:weightSum="1">
<TextView <TextView
android:id="@+id/sgv" android:id="@+id/sgv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom" android:layout_marginEnd="5dp"
android:layout_marginBottom="-2dp" android:gravity="bottom"
android:gravity="bottom|end"
android:paddingStart="0dp"
android:paddingTop="-2dp"
android:paddingEnd="5dp"
android:text="---"
android:textColor="@color/white"
android:textSize="41sp" android:textSize="41sp"
tools:ignore="HardcodedText" /> tools:text="---" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_gravity="center_horizontal" android:orientation="vertical">
android:baselineAligned="false"
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
<TextView <TextView
android:id="@+id/direction" android:id="@+id/direction"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom" android:layout_gravity="center_horizontal"
android:layout_marginTop="-2dp" android:textSize="25sp"
android:layout_marginBottom="-5dp"
android:gravity="center_horizontal|bottom"
android:text="--"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="30sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:text="--" />
<TextView <TextView
android:id="@+id/delta" android:id="@+id/delta"
android:layout_width="fill_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="center_horizontal"
android:gravity="center_horizontal|bottom" android:textSize="11sp"
android:text="@string/delta_na"
android:textColor="@color/white"
android:textSize="10sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="SmallSp" /> tools:text="1" />
</LinearLayout> </LinearLayout>
@ -80,65 +53,59 @@
<LinearLayout <LinearLayout
android:id="@+id/secondary_layout" android:id="@+id/secondary_layout"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/light_grey" android:layout_gravity="center_horizontal"
android:orientation="vertical" android:background="?android:colorForeground"
android:padding="1dp"> android:gravity="center_horizontal"
android:paddingVertical="1dp"
app:layout_constraintBottom_toTopOf="@+id/time">
<LinearLayout <TextView
android:id="@+id/timestamp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:textAlignment="center"
android:orientation="horizontal"> android:textColor="?android:textColorPrimaryInverse"
android:textSize="11sp"
android:textStyle="bold"
tools:text="@string/time_stamp_na_min_ago" />
<TextView <TextView
android:id="@+id/timestamp" android:id="@+id/uploader_battery"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/time_stamp_na_min_ago" android:paddingStart="10sp"
android:textAlignment="center" android:paddingEnd="0sp"
android:textColor="@color/black" android:textAlignment="center"
android:textSize="8sp" android:textColor="?android:textColorPrimaryInverse"
tools:ignore="SmallSp" /> android:textSize="11sp"
android:textStyle="bold"
tools:text="@string/uploader_na" />
<TextView <TextView
android:id="@+id/uploader_battery" android:id="@+id/raw"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="10sp" android:paddingStart="10sp"
android:paddingEnd="0sp" android:paddingEnd="0sp"
android:text="@string/uploader_na" android:textAlignment="center"
android:textAlignment="center" android:textColor="?android:textColorPrimaryInverse"
android:textColor="@color/black" android:textSize="11sp"
android:textSize="8sp" android:textStyle="bold"
tools:ignore="SmallSp" /> tools:text="" />
<TextView <TextView
android:id="@+id/raw" android:id="@+id/status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="10sp" android:paddingStart="10sp"
android:paddingEnd="0sp" android:paddingEnd="0sp"
android:text="" android:textAlignment="center"
android:textAlignment="center" android:textColor="?android:textColorPrimaryInverse"
android:textColor="@color/black" android:textSize="11sp"
android:textSize="8sp" android:textStyle="bold"
tools:ignore="SmallSp" /> tools:text="@string/no_status" />
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:paddingEnd="0sp"
android:text="@string/no_status"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="8sp"
tools:ignore="SmallSp" />
</LinearLayout>
</LinearLayout> </LinearLayout>
@ -146,19 +113,23 @@
android:id="@+id/time" android:id="@+id/time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal|top"
android:layout_marginTop="-2dp"
android:layout_marginBottom="-3dp"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/white"
android:textSize="30sp" android:textSize="35sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="12:00" /> tools:text="12:00" />
<lecho.lib.hellocharts.view.LineChartView <lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart" android:id="@+id/chart"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="77dp" android:layout_height="0dp"
android:layout_gravity="bottom" android:layout_marginTop="-5dp"
android:gravity="center_horizontal|top" /> android:paddingBottom="7dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/time" />
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,96 +1,64 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout" android:id="@+id/main_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black"
android:orientation="vertical" android:orientation="vertical"
android:textAlignment="center" tools:context=".watchfaces.AapsV2Watchface">
android:weightSum="1.1"
tools:context=".watchfaces.AapsV2Watchface"
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<View
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_weight="0.05"
android:orientation="vertical" />
<LinearLayout <LinearLayout
android:id="@+id/primary_layout" android:id="@+id/primary_layout"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_marginTop="5dp"
android:layout_weight="0.27"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="horizontal" app:layout_constraintBottom_toTopOf="@+id/secondary_layout"
android:textAlignment="center"> app:layout_constraintTop_toTopOf="parent">
<TextView <TextView
android:id="@+id/loop" android:id="@+id/loop"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|center" android:layout_gravity="bottom"
android:background="@drawable/loop_grey_25" android:background="@drawable/loop_grey_25"
android:gravity="center" android:gravity="center"
android:text="--'"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:text="--'" />
<TextView <TextView
android:id="@+id/sgv" android:id="@+id/sgv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom" android:layout_gravity=""
android:layout_marginBottom="-2dp" android:layout_marginBottom="-2dp"
android:gravity="bottom|end" android:paddingHorizontal="5dp"
android:paddingStart="5dp"
android:paddingTop="-2dp"
android:paddingEnd="5dp"
android:text="---"
android:textColor="@color/white"
android:textSize="38sp" android:textSize="38sp"
tools:ignore="HardcodedText" /> tools:text="---" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_gravity="center_horizontal" android:orientation="vertical">
android:baselineAligned="false"
android:gravity="center_vertical"
android:orientation="vertical"
android:paddingStart="0dp"
android:paddingEnd="4dp">
<TextView <TextView
android:id="@+id/direction" android:id="@+id/direction"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:gravity="center_horizontal|bottom"
android:text="--"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="22sp" android:textSize="22sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:text="--" />
<TextView <TextView
android:id="@+id/timestamp" android:id="@+id/timestamp"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:gravity="center" android:gravity="center"
android:text="--'"
android:textColor="@color/white"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:text="--'" />
</LinearLayout> </LinearLayout>
@ -99,50 +67,39 @@
<LinearLayout <LinearLayout
android:id="@+id/secondary_layout" android:id="@+id/secondary_layout"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="0px" android:layout_height="wrap_content"
android:layout_gravity="center" android:background="?android:colorForeground"
android:layout_weight="0.10" android:paddingVertical="1dp"
android:background="@color/light_grey" app:layout_constraintBottom_toTopOf="@+id/tertiary_layout"
android:gravity="center" app:layout_constraintEnd_toEndOf="parent"
android:orientation="vertical" app:layout_constraintStart_toStartOf="parent">
android:padding="1dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:paddingHorizontal="5dp">
android:gravity="center"
android:orientation="horizontal"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textAlignment="center">
<TextView <TextView
android:id="@+id/delta" android:id="@+id/delta"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="+/-" android:textColor="?android:textColorPrimaryInverse"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="13sp" android:textSize="13sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:text="+/-" />
<TextView <TextView
android:id="@+id/avg_delta" android:id="@+id/avg_delta"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="@string/abbreviation_average" android:textColor="?android:textColorPrimaryInverse"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="13sp" android:textSize="13sp"
android:textStyle="bold" /> android:textStyle="bold"
tools:text="@string/abbreviation_average" />
<TextView <TextView
android:id="@+id/uploader_battery" android:id="@+id/uploader_battery"
@ -151,12 +108,11 @@
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="--%"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/black" android:textColor="?android:textColorPrimaryInverse"
android:textSize="13sp" android:textSize="13sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:text="--%" />
<TextView <TextView
android:id="@+id/rig_battery" android:id="@+id/rig_battery"
@ -165,39 +121,34 @@
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="--%"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/black" android:textColor="?android:textColorPrimaryInverse"
android:textSize="13sp" android:textSize="13sp"
android:textStyle="bold" android:textStyle="bold"
android:visibility="gone" android:visibility="visible"
tools:ignore="HardcodedText" /> tools:text="--%" />
<TextView <TextView
android:id="@+id/basalRate" android:id="@+id/basalRate"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1.7" android:layout_weight="1.7"
android:gravity="center" android:gravity="center"
android:text="@string/no_tmp_basal_u_h" android:textColor="?android:textColorPrimaryInverse"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="13sp" android:textSize="13sp"
android:textStyle="bold" /> android:textStyle="bold"
tools:text="@string/no_tmp_basal_u_h" />
<TextView <TextView
android:id="@+id/bgi" android:id="@+id/bgi"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:textAlignment="center" android:textColor="?android:textColorPrimaryInverse"
android:textColor="@color/black"
android:textSize="13sp" android:textSize="13sp"
android:textStyle="bold" android:textStyle="bold"
android:visibility="gone" android:visibility="visible"
tools:text="bgi" /> tools:text="bgi" />
<View <View
@ -213,46 +164,30 @@
<LinearLayout <LinearLayout
android:id="@+id/tertiary_layout" android:id="@+id/tertiary_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="wrap_content"
android:layout_gravity="center" android:gravity="center_horizontal"
android:layout_weight="0.22" android:weightSum="7"
android:background="@color/black" app:layout_constraintBottom_toBottomOf="parent"
android:baselineAligned="false" app:layout_constraintTop_toTopOf="parent">
android:gravity="center"
android:orientation="horizontal"
android:padding="1dp"
android:weightSum="7">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center"
android:baselineAligned="false"
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical">
android:textAlignment="center">
<TextView <TextView
android:id="@+id/cob1" android:id="@+id/cob1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/activity_carb" android:text="@string/activity_carb"
android:textColor="@color/white" android:textSize="11sp" />
android:textSize="10sp"
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView <TextView
android:id="@+id/cob2" android:id="@+id/cob2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/no_cob_g" android:text="@string/no_cob_g"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" /> android:textStyle="bold" />
@ -268,10 +203,7 @@
android:id="@+id/time" android:id="@+id/time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/white"
android:textSize="30sp" android:textSize="30sp"
tools:text="12:00" /> tools:text="12:00" />
@ -279,10 +211,8 @@
android:id="@+id/date_time" android:id="@+id/date_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
android:textAlignment="center"
android:visibility="gone"> android:visibility="gone">
<TextView <TextView
@ -292,7 +222,6 @@
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/white"
android:textSize="12sp" android:textSize="12sp"
tools:text="day" /> tools:text="day" />
@ -302,7 +231,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:textColor="@color/white"
android:textSize="12sp" android:textSize="12sp"
tools:text="mth" /> tools:text="mth" />
@ -327,12 +255,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:text="@string/activity_IOB"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/white" android:textSize="11sp"
android:textSize="10sp" tools:text="@string/activity_IOB" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView <TextView
android:id="@+id/iob2" android:id="@+id/iob2"
@ -340,28 +265,21 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:text="@string/no_iob_u"
android:textColor="@color/white"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" /> android:textStyle="bold"
tools:text="@string/no_iob_u" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<lecho.lib.hellocharts.view.LineChartView <lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart" android:id="@+id/chart"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="0dp"
android:layout_gravity="bottom" android:layout_marginTop="-5dp"
android:layout_weight="0.41" android:layout_marginBottom="7dp"
android:gravity="center_horizontal|top" /> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tertiary_layout" />
<View </androidx.constraintlayout.widget.ConstraintLayout>
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_weight="0.05"
android:orientation="vertical" />
</LinearLayout>

View file

@ -1,24 +1,18 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout" android:id="@+id/main_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black" tools:context=".watchfaces.AapsLargeWatchface">
android:orientation="vertical"
android:textAlignment="center"
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<LinearLayout <LinearLayout
android:layout_width="147dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" app:layout_constraintBottom_toTopOf="@+id/secondary_layout"
android:gravity="center_vertical|center_horizontal" app:layout_constraintEnd_toEndOf="parent"
android:orientation="horizontal" app:layout_constraintStart_toStartOf="parent">
android:paddingTop="30dp"
android:textAlignment="center">
<TextView <TextView
android:id="@+id/sgv" android:id="@+id/sgv"
@ -26,45 +20,29 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="0dp" android:paddingStart="0dp"
android:paddingEnd="10dp" android:paddingEnd="10dp"
android:paddingBottom="3dp"
android:text="8.8"
android:textColor="@color/white"
android:textSize="50sp" android:textSize="50sp"
tools:ignore="HardcodedText" /> tools:text="18.8" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_gravity="center_horizontal" android:orientation="vertical">
android:baselineAligned="false"
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
<TextView <TextView
android:id="@+id/direction" android:id="@+id/direction"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:gravity="center_horizontal|bottom"
android:paddingTop="1dp"
android:text="--"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="27sp" android:textSize="27sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:text="--" />
<TextView <TextView
android:id="@+id/delta" android:id="@+id/delta"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="@string/delta_na" android:textSize="11sp"
android:textColor="@color/white" tools:text="@string/delta_na" />
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout> </LinearLayout>
@ -72,23 +50,23 @@
<LinearLayout <LinearLayout
android:id="@+id/secondary_layout" android:id="@+id/secondary_layout"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:background="?android:colorForeground"
android:background="@color/light_grey"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="horizontal" android:padding="2dp"
android:padding="2dp"> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView <TextView
android:id="@+id/timestamp" android:id="@+id/timestamp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="--'" android:textColor="?android:textColorPrimaryInverse"
android:textAlignment="center" android:textSize="@dimen/watch_face_large_status_size"
android:textColor="@color/black" tools:text="--'" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView <TextView
android:id="@+id/uploader_battery" android:id="@+id/uploader_battery"
@ -96,10 +74,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="10sp" android:paddingStart="10sp"
android:paddingEnd="0sp" android:paddingEnd="0sp"
android:text="@string/uploader_na" android:textColor="?android:textColorPrimaryInverse"
android:textAlignment="center" android:textSize="@dimen/watch_face_large_status_size"
android:textColor="@color/black" tools:text="@string/uploader_na" />
android:textSize="14sp" />
<TextView <TextView
android:id="@+id/raw" android:id="@+id/raw"
@ -107,10 +84,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="10sp" android:paddingStart="10sp"
android:paddingEnd="0sp" android:paddingEnd="0sp"
android:text="" android:textColor="?android:textColorPrimaryInverse"
android:textAlignment="center" android:textSize="@dimen/watch_face_large_status_size"
android:textColor="@color/black" tools:text="" />
android:textSize="14sp" />
<TextView <TextView
android:id="@+id/status" android:id="@+id/status"
@ -118,21 +94,36 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="10sp" android:paddingStart="10sp"
android:paddingEnd="0sp" android:paddingEnd="0sp"
android:text="@string/no_status" android:textColor="?android:textColorPrimaryInverse"
android:textAlignment="center" android:textSize="14sp"
android:textColor="@color/black" tools:text="@string/no_status" />
android:textSize="14sp" />
</LinearLayout> </LinearLayout>
<TextView <LinearLayout
android:id="@+id/time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top" app:layout_constraintEnd_toEndOf="parent"
android:textAlignment="center" app:layout_constraintStart_toStartOf="parent"
android:textColor="@color/white" app:layout_constraintTop_toBottomOf="@+id/secondary_layout">
android:textSize="55sp"
tools:text="12:00" />
</LinearLayout> <TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/watch_face_large_time_text_size"
tools:text="01:00" />
<TextView
android:id="@+id/timePeriod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="15sp"
android:layout_gravity="start"
android:textSize="@dimen/watch_face_large_time_period_text_size"
android:textStyle="bold"
tools:text="AM" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,60 +1,46 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout" android:id="@+id/main_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black" tools:context=".watchfaces.NoChartWatchface">
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical"
android:textAlignment="center"
tools:context=".watchfaces.NoChartWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:paddingBottom="5dp"
android:layout_marginTop="-15dp" app:layout_constraintBottom_toTopOf="@+id/status"
android:gravity="center_horizontal" app:layout_constraintEnd_toEndOf="parent"
android:orientation="horizontal" app:layout_constraintStart_toStartOf="parent">
android:textAlignment="center">
<TextView <TextView
android:id="@+id/delta" android:id="@+id/delta"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_marginEnd="5dp" android:maxLines="1"
android:gravity="center_horizontal|bottom" android:textSize="@dimen/watch_face_delta_text_size"
android:text="---" tools:text="+0.0" />
android:textColor="@color/white"
android:textSize="40sp"
tools:ignore="HardcodedText" />
<TextView <TextView
android:id="@+id/sgv" android:id="@+id/sgv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:maxLines="1"
android:gravity="center_horizontal" android:paddingHorizontal="3dp"
android:text="---" android:textSize="@dimen/watch_face_svg_text_size"
android:textColor="@color/white" tools:text="10.1" />
android:textSize="55sp"
tools:ignore="HardcodedText" />
<TextView <TextView
android:id="@+id/avg_delta" android:id="@+id/avg_delta"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_marginStart="5dp" android:maxLines="1"
android:gravity="center_horizontal|bottom" android:textSize="@dimen/watch_face_delta_text_size"
android:text="---" tools:text="+0.0" />
android:textColor="@color/white"
android:textSize="40sp"
tools:ignore="HardcodedText" />
</LinearLayout> </LinearLayout>
@ -62,40 +48,55 @@
android:id="@+id/status" android:id="@+id/status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:maxLines="1"
android:textAlignment="center" android:textSize="@dimen/watch_face_no_chart_status_size"
android:textColor="@color/white" app:layout_constraintBottom_toBottomOf="parent"
android:textSize="24sp" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="E xU/h IOB: x (x+x)" /> tools:text="E xU/h IOB: x (x+x)" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal|bottom" android:paddingTop="5dp"
android:orientation="horizontal" app:layout_constraintEnd_toEndOf="parent"
android:textAlignment="center"> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/status">
<TextView <TextView
android:id="@+id/time" android:id="@+id/time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp" android:layout_marginEnd="6dp"
android:textAlignment="center" android:textSize="@dimen/watch_face_time_text_size"
android:textColor="@color/white"
android:textSize="47sp"
tools:text="12:00" /> tools:text="12:00" />
<TextView <LinearLayout
android:id="@+id/timestamp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:orientation="vertical">
android:text="-- '"
android:textAlignment="center" <TextView
android:textColor="@color/white" android:id="@+id/timestamp"
android:textSize="35sp" android:layout_width="wrap_content"
tools:ignore="HardcodedText" /> android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:maxLines="1"
android:textSize="@dimen/watch_face_timestamp_text_size"
tools:text="5'" />
<TextView
android:id="@+id/timePeriod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-4dp"
android:textSize="11sp"
android:textStyle="bold"
tools:text="AM" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,114 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:background="@color/black"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical"
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-15dp"
android:layout_marginBottom="5dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAlignment="center">
<TextView
android:id="@+id/delta"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_marginEnd="5dp"
android:layout_marginBottom="-15dp"
android:gravity="center_vertical|center_horizontal|center"
android:text="---"
android:textColor="@color/white"
android:textSize="22sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="---"
android:textColor="@color/white"
android:textSize="42sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avg_delta"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_marginStart="5dp"
android:layout_marginBottom="-15dp"
android:gravity="center_vertical|center_horizontal|center"
android:text=" ---"
android:textColor="@color/white"
android:textSize="22sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<View
android:id="@+id/dummy1"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_gravity="bottom"
android:gravity="center_horizontal" />
<TextView
android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:paddingBottom="2dp"
android:text="@string/no_loop_status"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="21sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal|bottom"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="43sp"
tools:text="23:24" />
<TextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:text="--'"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>

View file

@ -4,9 +4,7 @@
android:id="@+id/main_layout" android:id="@+id/main_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".watchfaces.SteampunkWatchface" tools:context=".watchfaces.SteampunkWatchface">
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -173,14 +171,14 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.25" android:layout_weight="0.2"
tools:ignore="NestedWeights" /> tools:ignore="NestedWeights" />
<lecho.lib.hellocharts.view.LineChartView <lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart" android:id="@+id/chart"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.5" /> android:layout_weight="0.55" />
<View <View
android:layout_width="0px" android:layout_width="0px"

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Watch face sizes for bigger larger screen sizes -->
<dimen name="watch_face_svg_text_size">50sp</dimen>
<dimen name="watch_face_delta_text_size">25sp</dimen>
<dimen name="watch_face_time_text_size">45sp</dimen>
<dimen name="watch_face_timestamp_text_size">25sp</dimen>
<dimen name="watch_face_time_period_text_size">12sp</dimen>
<dimen name="watch_face_status_text_size">18sp</dimen>
<!-- Watch face specific-->
<dimen name="watch_face_no_chart_status_size">24sp</dimen>
<dimen name="watch_face_big_chart_svg_text_size">35sp</dimen>
<dimen name="watch_face_big_chart_delta_text_size">29sp</dimen>
<dimen name="watch_face_digital_svg_text_size">23sp</dimen>
<dimen name="watch_face_digital_direction_text_size">17sp</dimen>
<dimen name="watch_face_digital_timestamp_text_size">14sp</dimen>
<dimen name="watch_face_digital_sub_text_size">15sp</dimen>
<dimen name="watch_face_large_svg_text_size">55sp</dimen>
<dimen name="watch_face_large_direction_text_size">29sp</dimen>
<dimen name="watch_face_large_delta_text_size">13sp</dimen>
<dimen name="watch_face_large_time_text_size">55sp</dimen>
<dimen name="watch_face_large_time_period_text_size">13sp</dimen>
</resources>

View file

@ -1,8 +1,48 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--Watch Resources list of common watches with DP
Screen density = Screen width (or height) in pixels / Screen width (or height) in inches
dp = (width in pixels * 160) / screen density
Galaxy Watch 4 40mm: 1.2", 396 x 396 px = 192 dp
Galaxy Watch 4 44mm: 1.4", 450 x 450 px = 224 dp
Galaxy Watch 4 Classic 42mm: 1.19", 396 x 396 px = 190 dp
Galaxy Watch 4 Classic 46mm: 1.4", 450 x 450 px = 224 dp
Samsung Galaxy Watch 5 40mm: 1.2", 396 x 396 px = 192 dp
Samsung Galaxy Watch 5 44mm: 1.4", 450 x 450 px = 224 dp
TicWatch Pro 3: 1.39", 454 x 454 px = 222.4 dp
Fossil Gen 5: 1.28", 416 x 416 px = 204.8
Google Pixel Watch: 1.2", 450 x 450 px = 192 dp
-->
<resources> <resources>
<dimen name="simple_ui_svg_text_size">50sp</dimen> <dimen name="simple_ui_svg_text_size">50sp</dimen>
<dimen name="simple_ui_direction_text_size">35sp</dimen> <dimen name="simple_ui_direction_text_size">35sp</dimen>
<dimen name="simple_ui_time_text_size">35sp</dimen> <dimen name="simple_ui_time_text_size">35sp</dimen>
<dimen name="simple_ui_y_offset">5dp</dimen> <dimen name="simple_ui_y_offset">5dp</dimen>
<!-- Watch face sizes for small screen sizes -->
<dimen name="watch_face_svg_text_size">40sp</dimen>
<dimen name="watch_face_delta_text_size">20sp</dimen>
<dimen name="watch_face_time_text_size">35sp</dimen>
<dimen name="watch_face_timestamp_text_size">17sp</dimen>
<dimen name="watch_face_time_period_text_size">11sp</dimen>
<dimen name="watch_face_status_text_size">16sp</dimen>
<!-- Watch face specific-->
<dimen name="watch_face_no_chart_status_size">20sp</dimen>
<dimen name="watch_face_big_chart_svg_text_size">30sp</dimen>
<dimen name="watch_face_big_chart_delta_text_size">25sp</dimen>
<dimen name="watch_face_digital_svg_text_size">20sp</dimen>
<dimen name="watch_face_digital_direction_text_size">16sp</dimen>
<dimen name="watch_face_digital_timestamp_text_size">10sp</dimen>
<dimen name="watch_face_digital_sub_text_size">14sp</dimen>
<dimen name="watch_face_large_svg_text_size">50sp</dimen>
<dimen name="watch_face_large_direction_text_size">27sp</dimen>
<dimen name="watch_face_large_delta_text_size">11sp</dimen>
<dimen name="watch_face_large_time_text_size">50sp</dimen>
<dimen name="watch_face_large_time_period_text_size">11sp</dimen>
<dimen name="watch_face_large_status_size">14sp</dimen>
</resources> </resources>

View file

@ -216,9 +216,9 @@
<string name="no_iob_u">--U</string> <string name="no_iob_u">--U</string>
<string name="no_cob_g">--g</string> <string name="no_cob_g">--g</string>
<string name="no_tmp_basal_u_h">-.--U/h</string> <string name="no_tmp_basal_u_h">-.--U/h</string>
<string name="uploader_na">Uploader: ---%</string> <string name="uploader_na">U: --%</string>
<string name="no_status">S: no status</string> <string name="no_status">S: --</string>
<string name="time_stamp_na_min_ago">-- Minutes ago</string> <string name="time_stamp_na_min_ago">-- Min. ago</string>
<string name="delta_na">--- mg/dl</string> <string name="delta_na">--- mg/dl</string>
<string name="no_loop_status">No Loop Status</string> <string name="no_loop_status">No Loop Status</string>
<string name="cob_000g">000g</string> <string name="cob_000g">000g</string>