Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
activity_main.xml 5.48 KiB
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_scrollFlags="scroll|enterAlways"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        </android.support.v7.widget.Toolbar>

    </android.support.design.widget.AppBarLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10sp"
        android:layout_marginTop="10sp"
        android:baselineAligned="true"
        android:gravity="bottom"
        android:orientation="vertical">

        <TextView
            android:id="@+id/textview_bg_time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="5sp"
            android:text="never"
            android:textAppearance="?android:attr/textAppearanceMedium" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|center_horizontal"
            android:baselineAligned="false">

            <TextView
                android:id="@+id/textview_bg"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                android:layout_weight="1"
                android:singleLine="true"
                android:text="-"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:textSize="70sp" />

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="fill_parent"
                android:layout_gravity="bottom"
                android:layout_weight="1"
                android:gravity="bottom|center_horizontal"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/textview_trend"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center|top"
                    android:singleLine="true"
                    android:text="-"
                    android:textAppearance="?android:attr/textAppearanceLarge"
                    android:textSize="40sp" />

                <TextView
                    android:id="@+id/textview_units"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:singleLine="true"
                    android:text="mmol/L"
                    android:textAppearance="?android:attr/textAppearanceSmall" />

            </LinearLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="center_horizontal"
            android:orientation="horizontal"
            android:paddingTop="10sp">

            <TextView
                android:id="@+id/label_iob"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Active Insulin: "
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textview_iob"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="-"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/label_units"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text=" U"
                android:textAppearance="?android:attr/textAppearanceMedium" />
        </LinearLayout>

    </LinearLayout>

    <com.github.mikephil.charting.charts.ScatterChart
        android:id="@+id/chart"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:visibility="visible" />

    <ScrollView
        android:id="@+id/scrollView"
        android:layout_width="match_parent"
        android:layout_height="fill_parent">

        <LinearLayout
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/textview_log"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_margin="10sp"
                android:maxLines="20"
                android:text="" />
        </LinearLayout>
    </ScrollView>

</LinearLayout>