AndroidAPS/wear/src/main/res/layout/rect_activity_home_2.xml
Andrew Warrington dcf79c710c Update following testing! Bug fixes:
- Detailed IOB always shown in older watch faces (fixed)
- Cockpit: Loop graphic stays red once set (fixed)

Design changes:
- AAPSv2: Changed spacing of status and cob/time/iob lines to use layout_weight instead of padding (more dynamic)
- Removed decimal point in delta strings when BG is in mg/dL to gain space so everything fits with all options switched on. This will affect older watch faces.
- Changed to 1 decimal point in BGI to gain space. This will affect older watches as well.
- Changed order of preferences to match screen layout more closely

New features:
- Exposed BGI as an individual item in dataMap & added to BaseWatchFace + AAPSv2
2017-11-28 09:24:52 +01:00

369 lines
15 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.Home2" tools:deviceIds="wear_square"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="center_horizontal"
android:layout_weight="0.27"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/loop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:background="@drawable/loop_grey_25"
android:gravity="center"
android:text="--'"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/sgv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="-2dp"
android:gravity="bottom|right"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="-2dp"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="38sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:gravity="center_vertical"
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:gravity="center_horizontal|bottom"
android:text="--"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="22sp"
android:textStyle="bold" />
<TextView
android:id="@+id/timestamp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:gravity="center"
android:text="--'"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/secondary_layout"
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.10"
android:background="@color/light_grey"
android:gravity="center"
android:orientation="vertical"
android:padding="1dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:textAlignment="center">
<TextView
android:id="@+id/delta"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="+/-"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/avgdelta"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="avg"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/uploader_battery"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/rig_battery"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone" />
<TextView
android:id="@+id/tmpBasal"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1.7"
android:gravity="center"
android:text="-.--U/h"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/bgiView"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="bgi"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone" />
<TextView
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text=""
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/tertiary_layout"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.22"
android:background="@color/black"
android:gravity="center"
android:orientation="vertical"
android:padding="1dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:baselineAligned="false"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="7">
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"></LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:baselineAligned="false"
android:gravity="center"
android:orientation="vertical"
android:textAlignment="center">
<TextView
android:id="@+id/cob_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="Carb"
android:textColor="#FFFFFF"
android:textSize="10sp"
android:textStyle="bold" />
<TextView
android:id="@+id/cobView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--g"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"></LinearLayout>
<TextView
android:id="@+id/watch_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="12:00"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="26sp" />
<LinearLayout
android:id="@+id/date_time"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:textAlignment="center"
android:visibility="gone">
<TextView
android:id="@+id/day"
android:layout_width="23dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="day"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="10sp" />
<TextView
android:id="@+id/month"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="mth"
android:textColor="#FFFFFF"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"></LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:textAlignment="center">
<TextView
android:id="@+id/iob_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="IOB"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="10sp"
android:textStyle="bold" />
<TextView
android:id="@+id/iobView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--U"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"></LinearLayout>
</LinearLayout>
</LinearLayout>
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="0.41"
android:gravity="center_horizontal|top" />
</LinearLayout>
</RelativeLayout>