Ready for review. Summary of all changes to date: New watch faces AAPSv2 and AAPS(Cockpit) work on both round and rectangular screens. Tested on Asus Zenwatch 3, Moto 360 42mm, and Sony Smart Watch 3. New watch settings included, to add/remove individual data items from the display. WatchUpdaterService and BaseWatchFace both updated to enable switching on and off of individual data items.

This commit is contained in:
Andrew Warrington 2017-11-22 22:46:43 +01:00
parent 78dd6d165b
commit d1fbaa29c9
8 changed files with 848 additions and 588 deletions

View file

@ -65,6 +65,7 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
public int basalCenterColor = Color.BLUE;
public boolean lowResMode = false;
public boolean layoutSet = false;
public boolean bIsRound = false;
public int pointSize = 2;
public int missed_readings_alert_id = 818;
public BgGraphBuilder bgGraphBuilder;
@ -118,6 +119,7 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
protected void onLayout(WatchShape shape, Rect screenBounds, WindowInsets screenInsets) {
super.onLayout(shape, screenBounds, screenInsets);
layoutView.onApplyWindowInsets(screenInsets);
bIsRound = screenInsets.isRound();
}
public void performViewSetup() {
@ -342,7 +344,7 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
mIOB1.setVisibility(View.VISIBLE);
mIOB2.setVisibility(View.VISIBLE);
if (detailedIOB) {
mIOB1.setText("IOB " + sIOB1);
mIOB1.setText(sIOB1);
mIOB2.setText(sIOB2);
} else {
mIOB1.setText("IOB");
@ -505,7 +507,7 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
}
private boolean isLowRes(WatchMode watchMode) {
return (watchMode == WatchMode.LOW_BIT) || (watchMode == WatchMode.LOW_BIT_BURN_IN) || (watchMode == WatchMode.LOW_BIT_BURN_IN);
return (watchMode == WatchMode.LOW_BIT) || (watchMode == WatchMode.LOW_BIT_BURN_IN); // || (watchMode == WatchMode.LOW_BIT_BURN_IN);
}
@Override

View file

@ -1,18 +1,15 @@
package info.nightscout.androidaps.watchfaces;
import android.content.Intent;
import android.support.wearable.view.WatchViewStub;
import android.support.wearable.watchface.WatchFaceStyle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.interaction.menus.MainMenuActivity;
/**
* Created by Andrew on 18/11/2017.
* Created by andrew-warrington on 18/11/2017.
*/
public class Cockpit extends BaseWatchFace {
@ -25,7 +22,6 @@ public class Cockpit extends BaseWatchFace {
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
layoutView = inflater.inflate(R.layout.activity_cockpit, null);
performViewSetup();
final WatchViewStub stub = (WatchViewStub) layoutView.findViewById(R.id.watch_view_stub);
}
@Override
@ -50,32 +46,15 @@ public class Cockpit extends BaseWatchFace {
}
@Override
protected WatchFaceStyle getWatchFaceStyle(){
protected WatchFaceStyle getWatchFaceStyle() {
return new WatchFaceStyle.Builder(this).setAcceptsTapEvents(true).build();
}
protected void setColorDark() {
/*
//set text sizes
float scaleFactor = specH / 400f; //the design assumes 400dp is the default screen height.
if (mTime != null) mTime.setTextSize(18*scaleFactor);
if (mSgv != null) mSgv.setTextSize(38*scaleFactor);
if (mDirection != null) mDirection.setTextSize(30*scaleFactor);
if (mDelta != null) mDelta.setTextSize(14*scaleFactor);
if (mBasalRate != null) mBasalRate.setTextSize(14*scaleFactor);
if (mIOB2 != null) mIOB2.setTextSize(14*scaleFactor);
if (mCOB2 != null) mCOB2.setTextSize(14*scaleFactor);
if (mUploaderBattery != null) mUploaderBattery.setTextSize(14*scaleFactor);
if (mRigBattery != null) mRigBattery.setTextSize(14*scaleFactor);
if (mTimestamp != null) mTimestamp.setTextSize(14*scaleFactor);
if (mLoop != null) mLoop.setTextSize(14*scaleFactor);
if (mHighLight != null) mHighLight.setTextSize(8*scaleFactor);
if (mLowLight != null) mLowLight.setTextSize(8*scaleFactor);
if (isAAPSv2 != null) isAAPSv2.setTextSize(16*scaleFactor);
*/
mRelativeLayout.setBackgroundResource(R.drawable.airplane_cockpit_outside_clouds);
setTextSizes();
Log.d("Lights", "mHighLight is " + mHighLight + " and mLowLight is " + mLowLight + ". sgvLevel is " + sgvLevel);
if (mHighLight != null && mLowLight != null) {
if (sgvLevel == 1) {
mHighLight.setBackgroundResource(R.drawable.airplane_led_yellow_lit);
@ -89,44 +68,53 @@ public class Cockpit extends BaseWatchFace {
}
}
int paddingPixel;
int paddingDp;
float density = this.getResources().getDisplayMetrics().density;
if (sharedPrefs.getBoolean("show_uploader_battery", true) && sharedPrefs.getBoolean("show_rig_battery", false)) {
paddingPixel = 8;
mUploaderBattery.setTextSize(10);
mRigBattery.setTextSize(10);
} else {
paddingPixel = 3;
mUploaderBattery.setTextSize(14);
mRigBattery.setTextSize(14);
}
paddingDp = (int)(paddingPixel * density);
mUploaderBattery.setPadding(0, paddingDp,0,0);
mRigBattery.setPadding(0, paddingDp,0,0);
if (mIOB2 != null) {
if (detailedIOB) {
paddingPixel = 8;
mIOB2.setTextSize(10);
} else {
paddingPixel = 3;
mIOB2.setTextSize(14);
}
paddingDp = (int)(paddingPixel * density);
mIOB2.setPadding(0, paddingDp,0,0);
}
invalidate();
}
protected void setColorLowRes() {
setColorDark();
mRelativeLayout.setBackgroundResource(R.drawable.airplane_cockpit_outside_clouds_lowres);
}
protected void setColorBright() {
setColorDark();
}
protected void setTextSizes() {
if (mIOB2 != null) {
if (detailedIOB) {
if (bIsRound) {
mIOB2.setTextSize(10);
} else {
mIOB2.setTextSize(9);
}
} else {
if (bIsRound) {
mIOB2.setTextSize(13);
} else {
mIOB2.setTextSize(12);
}
}
}
if ((mUploaderBattery.getVisibility() != View.GONE) && (mRigBattery.getVisibility() != View.GONE)) {
if (bIsRound) {
mUploaderBattery.setTextSize(12);
mRigBattery.setTextSize(12);
} else {
mUploaderBattery.setTextSize(10);
mRigBattery.setTextSize(10);
}
} else {
if (bIsRound) {
mUploaderBattery.setTextSize(13);
mRigBattery.setTextSize(13);
} else {
mUploaderBattery.setTextSize(12);
mRigBattery.setTextSize(12);
}
}
}
}

View file

@ -76,7 +76,7 @@ public class Home2 extends BaseWatchFace {
mMonth.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_midColor));
mLoop.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_midColor));
setIobTextSize();
setTextSizes();
if (sgvLevel == 1) {
mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_highColor));
@ -152,7 +152,7 @@ public class Home2 extends BaseWatchFace {
pointSize = 2;
setupCharts();
}
setIobTextSize();
setTextSizes();
}
protected void setColorBright() {
@ -170,7 +170,7 @@ public class Home2 extends BaseWatchFace {
mMonth.setTextColor(Color.BLACK);
mLoop.setTextColor(Color.BLACK);
setIobTextSize();
setTextSizes();
if (sgvLevel == 1) {
mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_highColor));
@ -219,7 +219,7 @@ public class Home2 extends BaseWatchFace {
}
}
protected void setIobTextSize() {
protected void setTextSizes() {
if (mIOB1 != null && mIOB2 != null) {
@ -230,13 +230,6 @@ public class Home2 extends BaseWatchFace {
mIOB1.setTextSize(10);
mIOB2.setTextSize(14);
}
//deal with cases where there is only the value shown for IOB, and not the label
} else if (mIOB2 != null) {
if (detailedIOB) {
mIOB2.setTextSize(10);
} else {
mIOB2.setTextSize(14);
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View file

@ -13,15 +13,15 @@
android:weightSum="1">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:paddingTop="15dp"
android:weightSum="1"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:gravity="center_horizontal"
android:layout_marginTop="-5dp">
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAlignment="center"
android:weightSum="1">
<TextView
android:id="@+id/loop"
@ -41,17 +41,17 @@
<TextView
android:id="@+id/sgv"
android:textSize="38sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="-2dp"
android:gravity="bottom|right"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_marginBottom="-2dp"
android:paddingTop="-2dp" />
android:paddingTop="-2dp"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="38sp" />
<LinearLayout
android:layout_width="wrap_content"
@ -115,7 +115,7 @@
android:text="delta"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="14sp"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
@ -126,7 +126,7 @@
android:text="--%"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="14sp"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
@ -137,7 +137,7 @@
android:text="--%"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="14sp"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone" />
@ -149,7 +149,7 @@
android:text="-.--U/h"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="14sp"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
@ -214,11 +214,11 @@
android:layout_height="wrap_content"
android:layout_marginBottom="-3dp"
android:layout_marginTop="-2dp"
android:paddingLeft="20sp"
android:paddingLeft="14dp"
android:text="12:00"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="30sp" />
android:textSize="26sp" />
<LinearLayout
android:id="@+id/date_time"
@ -239,7 +239,7 @@
android:text="day"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="12sp" />
android:textSize="10sp" />
<TextView
android:id="@+id/month"
@ -248,7 +248,7 @@
android:gravity="center_horizontal"
android:text="mth"
android:textColor="#FFFFFF"
android:textSize="12sp" />
android:textSize="10sp" />
</LinearLayout>
@ -258,7 +258,7 @@
android:layout_gravity="center_vertical"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingLeft="18sp"
android:paddingLeft="12dp"
android:textAlignment="center">
<TextView
@ -291,6 +291,7 @@
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_gravity="bottom"
android:layout_marginTop="5dp"
android:gravity="center_horizontal|top" />
</LinearLayout>

View file

@ -2,321 +2,210 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.Cockpit" tools:deviceIds="wear_square"
android:id="@+id/main_layout">
android:id="@+id/main_layout"
android:background="@drawable/airplane_cockpit_outside_clouds">
<LinearLayout
android:id="@+id/outside"
android:id="@+id/inside"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/airplane_cockpit_outside_clouds"
android:background="@drawable/airplane_cockpit"
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0px"
android:orientation="vertical"
android:layout_weight="0.095">
</LinearLayout>
<LinearLayout
android:id="@+id/inside"
android:id="@+id/windows"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/airplane_cockpit"
android:elevation="5dp"
android:layout_height="0px"
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
android:layout_weight="0.2575">
<LinearLayout
android:id="@+id/windows"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:textAlignment="center"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="15dp"
android:textAlignment="center"
android:weightSum="1">
<LinearLayout
android:id="@+id/warnings"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical"
android:paddingTop="4dp"
android:textAlignment="center"
android:weightSum="1">
<TextView
android:id="@+id/highLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_vertical|center_horizontal"
android:text="H"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="8sp"
android:textStyle="bold" />
<TextView
android:id="@+id/highLight"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center_vertical|center_horizontal"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="8sp" />
<TextView
android:id="@+id/lowLight"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginTop="14dp"
android:autoText="false"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center_horizontal|center"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="8sp" />
<TextView
android:id="@+id/lowLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_vertical|center_horizontal"
android:text="L"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="8sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="0.47" />
<LinearLayout
android:id="@+id/dashboard"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/warnings"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.06"
android:baselineAligned="false"
android:orientation="vertical">
<TextView
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAPSv2"
android:textSize="16sp"
android:visibility="invisible" />
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="0.2" />
<TextView
android:id="@+id/highLight"
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="1"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center"
android:text="H"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp"
android:textStyle="bold" />
<TextView
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="2" />
<TextView
android:id="@+id/lowLight"
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="1"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center"
android:text="L"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp"
android:textStyle="bold" />
<TextView
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="0.2" />
</LinearLayout>
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="0.47" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/dashboard"
android:layout_width="fill_parent"
android:layout_height="0px"
android:orientation="vertical"
android:layout_weight="0.0775">
</LinearLayout>
<LinearLayout
android:id="@+id/instruments"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.57"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.08"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:id="@+id/instruments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="1dp">
android:id="@+id/panel1"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.275"
android:baselineAligned="false"
android:orientation="horizontal"
android:gravity="center"
android:textAlignment="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:textAlignment="center">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.07" />
<LinearLayout
android:id="@+id/panel1"
android:layout_width="70dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.5"
android:orientation="vertical"
android:textAlignment="center">
android:weightSum="1">
<TextView
android:id="@+id/sgv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="1"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="38sp" />
android:textColor="@color/primary_text_dark"
android:textSize="26sp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.276"
android:orientation="horizontal"
android:weightSum="1">
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.35" />
<TextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginRight="14dp"
android:layout_marginTop="17dp"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.65"
android:text="--'"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/panel2"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingEnd="4dp"
android:paddingStart="4dp"
android:textAlignment="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/watch_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="12:00"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tmpBasal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="-.--U/h"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/iobView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="--U"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/cobView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="--g"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/uploader_battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/rig_battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10sp"
android:text="--%"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="14sp"
android:textStyle="bold"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/panel3"
android:layout_width="70dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:gravity="center_horizontal"
android:orientation="vertical"
android:textAlignment="center">
<TextView
android:id="@+id/direction"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginTop="6dp"
android:gravity="center_horizontal|bottom"
android:text="--"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="30sp"
android:textStyle="bold" />
<TextView
android:id="@+id/delta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="delta"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/loop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_marginLeft="11dp"
android:layout_marginTop="15dp"
android:background="@drawable/loop_grey_25"
android:gravity="center"
android:text="--'"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
@ -326,6 +215,250 @@
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.0225"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:id="@+id/panel2"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.245"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1.01">
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.020" />
<TextView
android:id="@+id/watch_time"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.19"
android:gravity="center"
android:text="12:00"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tmpBasal"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.19"
android:gravity="bottom|center_horizontal"
android:text="-.--U/h"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/iobView"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.18"
android:gravity="bottom|center_horizontal"
android:text="--U"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/cobView"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.185"
android:gravity="bottom|center_horizontal"
android:text="--g"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="12sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.185"
android:gravity="center"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/uploader_battery"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="bottom|center_horizontal"
android:gravity="bottom|center_horizontal"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/rig_battery"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="bottom|center_horizontal"
android:gravity="bottom|center_horizontal"
android:paddingLeft="4dp"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.06" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.0225"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:id="@+id/panel3"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.275"
android:baselineAligned="false"
android:orientation="horizontal"
android:textAlignment="center">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.07" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.5"
android:gravity="center"
android:orientation="vertical"
android:weightSum="0.5">
<TextView
android:id="@+id/direction"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.333"
android:gravity="center"
android:text="--"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="28sp"
android:textStyle="bold" />
<TextView
android:id="@+id/delta"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.167"
android:gravity="center"
android:text="delta"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.250"
android:orientation="horizontal"
android:weightSum="1">
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.1" />
<TextView
android:id="@+id/loop"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_weight="0.5"
android:background="@drawable/loop_grey_25"
android:text="--'"
android:gravity="center"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/AAPSv2"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.4"
android:visibility="invisible"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.08"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -6,304 +6,429 @@
android:background="@drawable/airplane_cockpit_outside_clouds">
<LinearLayout
android:id="@+id/inside"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/airplane_cockpit"
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
android:id="@+id/inside"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/airplane_cockpit"
android:elevation="5dp"
android:layout_height="0px"
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
android:layout_weight="0.095">
</LinearLayout>
<LinearLayout
android:id="@+id/windows"
android:layout_width="fill_parent"
android:layout_height="0px"
android:orientation="vertical"
android:layout_weight="0.2575">
<LinearLayout
android:id="@+id/windows"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:textAlignment="center"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="0.47" />
<LinearLayout
android:id="@+id/warnings"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.06"
android:baselineAligned="false"
android:orientation="vertical">
<TextView
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="0.2" />
<TextView
android:id="@+id/highLight"
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="1"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center"
android:text="H"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp"
android:textStyle="bold" />
<TextView
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="2" />
<TextView
android:id="@+id/lowLight"
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="1"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center"
android:text="L"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp"
android:textStyle="bold" />
<TextView
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="0.2" />
</LinearLayout>
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="0.47" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/dashboard"
android:layout_width="fill_parent"
android:layout_height="0px"
android:orientation="vertical"
android:layout_weight="0.0775">
</LinearLayout>
<LinearLayout
android:id="@+id/instruments"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.57"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:gravity="center_horizontal"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.08"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:id="@+id/panel1"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.275"
android:baselineAligned="false"
android:orientation="horizontal"
android:paddingTop="15dp"
android:textAlignment="center"
android:weightSum="1">
android:gravity="center"
android:textAlignment="center">
<LinearLayout
android:id="@+id/warnings"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:gravity="center_vertical|center_horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="4dp"
android:textAlignment="center"
android:weightSum="1">
<TextView
android:id="@+id/highLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_vertical|center_horizontal"
android:text="H"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp"
android:textStyle="bold" />
android:layout_height="0px"
android:layout_weight="0.07" />
<TextView
android:id="@+id/highLight"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center_vertical|center_horizontal"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp" />
<TextView
android:id="@+id/lowLight"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginTop="14dp"
android:autoText="false"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center_horizontal|center"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp" />
<TextView
android:id="@+id/lowLabel"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_vertical|center_horizontal"
android:text="L"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp"
android:textStyle="bold" />
android:layout_height="0px"
android:layout_weight="0.5"
android:orientation="vertical"
android:weightSum="1">
<TextView
android:id="@+id/sgv"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="1"
android:text="---"
android:textColor="@color/primary_text_dark"
android:textSize="34sp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.276"
android:orientation="horizontal"
android:weightSum="1">
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.35" />
<TextView
android:id="@+id/timestamp"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.65"
android:text="--'"
android:gravity="center"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/dashboard"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAPSv2"
android:textSize="16sp"
android:visibility="invisible" />
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.0225"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:id="@+id/instruments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="1dp">
android:id="@+id/panel2"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.245"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:textAlignment="center">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1.01">
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.020" />
<TextView
android:id="@+id/watch_time"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.19"
android:gravity="center"
android:text="12:00"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tmpBasal"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.19"
android:gravity="bottom|center_horizontal"
android:text="-.--U/h"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
android:textStyle="bold" />
<TextView
android:id="@+id/iobView"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.18"
android:gravity="bottom|center_horizontal"
android:text="--U"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
android:textStyle="bold" />
<TextView
android:id="@+id/cobView"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.185"
android:gravity="bottom|center_horizontal"
android:text="--g"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="13sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/panel1"
android:layout_width="70dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:gravity="center_horizontal"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.185"
android:gravity="center"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/sgv"
android:id="@+id/uploader_battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:text="---"
android:textColor="@color/primary_text_dark"
android:textSize="38sp" />
<TextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginRight="15dp"
android:layout_marginTop="21dp"
android:text="--'"
android:layout_height="match_parent"
android:layout_gravity="bottom|center_horizontal"
android:gravity="bottom|center_horizontal"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textSize="13sp"
android:textStyle="bold" />
<TextView
android:id="@+id/rig_battery"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="bottom|center_horizontal"
android:gravity="bottom|center_horizontal"
android:paddingLeft="4dp"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
android:textStyle="bold"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:id="@+id/panel2"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingEnd="4dp"
android:paddingStart="4dp"
android:textAlignment="center">
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.06" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:textAlignment="center">
</LinearLayout>
<TextView
android:id="@+id/watch_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="12:00"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.0225"
android:baselineAligned="false"
android:orientation="horizontal">
<TextView
android:id="@+id/tmpBasal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:text="-.--U/h"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/iobView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="--U"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/panel3"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.275"
android:baselineAligned="false"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/cobView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="--g"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/uploader_battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/rig_battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="4dp"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.07" />
<LinearLayout
android:id="@+id/panel3"
android:layout_width="70dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.5"
android:gravity="center"
android:orientation="vertical"
android:textAlignment="center">
android:weightSum="0.5">
<TextView
android:id="@+id/direction"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginTop="6dp"
android:gravity="center_horizontal|bottom"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.333"
android:gravity="center"
android:text="--"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="30sp"
android:textColor="@color/primary_text_dark"
android:textSize="28sp"
android:textStyle="bold" />
<TextView
android:id="@+id/delta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.167"
android:gravity="center"
android:text="delta"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.250"
android:orientation="horizontal"
android:weightSum="1">
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.1" />
<TextView
android:id="@+id/loop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_marginLeft="11dp"
android:layout_marginTop="19dp"
android:layout_weight="0.5"
android:background="@drawable/loop_grey_25"
android:gravity="center"
android:text="--'"
@ -312,14 +437,32 @@
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/AAPSv2"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.4"
android:visibility="invisible"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.08"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>