refactor overview with new header area and better formated user values for iob, cob and basal

This commit is contained in:
osodebailar 2019-12-23 18:07:51 +01:00
parent 677f1e4c8d
commit 1d48536c3c
4 changed files with 520 additions and 469 deletions

View file

@ -7,7 +7,6 @@ import android.content.ActivityNotFoundException;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.graphics.Color;
import android.graphics.Paint; import android.graphics.Paint;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
@ -25,7 +24,6 @@ import android.widget.ImageButton;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.PopupMenu; import androidx.appcompat.widget.PopupMenu;
import androidx.core.content.res.ResourcesCompat; import androidx.core.content.res.ResourcesCompat;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
@ -184,7 +182,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
boolean smallWidth; boolean smallWidth;
boolean smallHeight; boolean smallHeight;
public static boolean shorttextmode = false; public static boolean shorttextmode = true;
private boolean accepted; private boolean accepted;
@ -239,7 +237,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
timeAgoShortView = (TextView) view.findViewById(R.id.overview_timeagoshort); timeAgoShortView = (TextView) view.findViewById(R.id.overview_timeagoshort);
deltaView = (TextView) view.findViewById(R.id.overview_delta); deltaView = (TextView) view.findViewById(R.id.overview_delta);
deltaShortView = (TextView) view.findViewById(R.id.overview_deltashort); deltaShortView = (TextView) view.findViewById(R.id.overview_deltashort);
avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta); // TODO: avgdeltaView in Expertmode
//avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta);
baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal); baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal);
extendedBolusView = (TextView) view.findViewById(R.id.overview_extendedbolus); extendedBolusView = (TextView) view.findViewById(R.id.overview_extendedbolus);
activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile); activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile);
@ -1162,9 +1161,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
if (activeTemp != null) { if (activeTemp != null) {
fullText += MainApp.gs(R.string.pump_tempbasal_label) + ": " + activeTemp.toStringFull(); fullText += MainApp.gs(R.string.pump_tempbasal_label) + ": " + activeTemp.toStringFull();
} }
OKDialog.show(getActivity(), MainApp.gs(R.string.basal), fullText); OKDialog.show(getActivity(), MainApp.gs(R.string.basal), fullText, null);
}); });
} else { } else {
if (activeTemp != null) { if (activeTemp != null) {
basalText = activeTemp.toStringFull() + " "; basalText = activeTemp.toStringFull() + " ";
@ -1175,12 +1173,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
basalText += "(" + DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + "U/h)"; basalText += "(" + DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + "U/h)";
} }
} }
if (activeTemp != null) {
baseBasalView.setTextColor(MainApp.gc(R.color.basal));
} else {
baseBasalView.setTextColor(Color.WHITE);
}
baseBasalView.setText(basalText); baseBasalView.setText(basalText);

View file

@ -97,87 +97,203 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:baselineAligned="false"
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:layout_weight="0"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:id="@+id/overview_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:gravity="center_vertical"
android:text="00.0"
android:textSize="70dp"
android:textStyle="bold" />
<TextView
android:id="@+id/overview_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:layout_marginTop="-15dp"
android:gravity="center_vertical"
android:paddingLeft="-5dp"
android:paddingRight="-5dp"
android:text="→"
android:textSize="70dp"
android:textStyle="bold" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top" android:layout_weight="1"
android:layout_marginTop="10dp"
android:gravity="top"
android:orientation="vertical"> android:orientation="vertical">
<TextView <LinearLayout
android:id="@+id/overview_timeago"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:orientation="horizontal">
android:layout_weight="0.5"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView <TextView
android:id="@+id/overview_delta" android:id="@+id/overview_bg"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_gravity="center_vertical"
android:layout_weight="0.5" android:layout_marginStart="6dp"
android:textAppearance="?android:attr/textAppearanceMedium" /> android:text="00.0"
android:textSize="42sp"
android:textStyle="bold" />
<TextView <TextView
android:id="@+id/overview_avgdelta" android:id="@+id/overview_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="-5dp"
android:layout_marginEnd="4dp"
android:paddingStart="-2dp"
android:paddingEnd="0dp"
android:text="→"
android:textSize="28sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:layout_marginTop="2dp"
android:layout_marginBottom="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/overview_timeago"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="-2dp"
android:paddingStart="2dp"
android:layout_weight="0.5"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_delta"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="-2dp"
android:paddingStart="2dp"
android:layout_weight="0.5"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> <LinearLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall" android:layout_weight="1"
android:textStyle="normal|bold" /> android:layout_marginTop="6dp"
android:orientation="vertical">
<TextView <LinearLayout
android:id="@+id/overview_basebasal" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:orientation="horizontal">
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="@string/iob"
android:textSize="16sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_iob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:text=""
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="@string/cob"
android:textSize="16sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_cob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text=""
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="@string/basal_short"
android:textSize="16sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_basebasal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="0.50U/h @17:35 1/30min - 0.40U/h"
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="AS"
android:textSize="16sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text=""
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
@ -244,100 +360,9 @@
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white" /> android:textColor="@color/mdtp_white" />
<com.google.android.flexbox.FlexboxLayout 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="wrap_content"
app:alignContent="center"
app:alignItems="center"
app:flexDirection="row"
app:flexWrap="wrap"
app:justifyContent="space_around">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/iob"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text=":" />
<TextView
android:id="@+id/overview_iob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:text=""
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:text="@string/cob" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text=":" />
<TextView
android:id="@+id/overview_cob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:text="@string/as" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text=":" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:text="" />
</LinearLayout>
</com.google.android.flexbox.FlexboxLayout>
<RelativeLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="0dp" android:layout_height="match_parent"
android:layout_weight="1"> android:layout_weight="1">
<com.jjoe64.graphview.GraphView <com.jjoe64.graphview.GraphView

View file

@ -5,340 +5,360 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".plugins.general.overview.OverviewFragment"> tools:context=".plugins.general.overview.OverviewFragment">
<ScrollView <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="vertical"> android:layout_above="@+id/overview_buttons"
android:fillViewport="true">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/overview_notifications"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.recyclerview.widget.RecyclerView>
<LinearLayout <LinearLayout
android:id="@+id/overview_looplayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="vertical">
android:paddingTop="2dp">
<TextView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/overview_apsmode" android:id="@+id/overview_notifications"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:text="Open Loop"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/overview_activeprofile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:text="Profile"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/overview_temptarget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:text="TempTarget"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_pumpstatuslayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingTop="2dp">
<TextView
android:id="@+id/overview_pumpstatus"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content">
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:gravity="center_vertical|center_horizontal"
android:text="@string/initializing"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<LinearLayout </androidx.recyclerview.widget.RecyclerView>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/overview_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:gravity="center_vertical"
android:text="00.0"
android:textSize="70dp"
android:textStyle="bold" />
<TextView
android:id="@+id/overview_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:layout_marginTop="-15dp"
android:gravity="center_vertical"
android:paddingLeft="-5dp"
android:paddingRight="-5dp"
android:text="→"
android:textSize="70dp"
android:textStyle="bold" />
<LinearLayout <LinearLayout
android:id="@+id/overview_looplayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top" android:orientation="horizontal"
android:layout_marginTop="10dp" android:paddingTop="2dp">
android:gravity="top"
android:orientation="vertical">
<TextView <TextView
android:id="@+id/overview_timeago" android:id="@+id/overview_apsmode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="0.5"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/overview_delta"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="0.5"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/overview_avgdelta"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_marginLeft="10dp" android:layout_marginRight="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:text="Open Loop"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/overview_activeprofile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:text="Profile"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/overview_temptarget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:text="TempTarget"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white" />
</LinearLayout> </LinearLayout>
</LinearLayout> <LinearLayout
android:id="@+id/overview_pumpstatuslayout"
<LinearLayout android:layout_width="match_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:orientation="horizontal"
android:textAppearance="?android:attr/textAppearanceSmall" android:paddingTop="2dp">
android:textStyle="normal|bold" />
<TextView <TextView
android:layout_width="20dp" android:id="@+id/overview_pumpstatus"
android:layout_height="wrap_content" /> android:layout_width="match_parent"
android:layout_height="wrap_content"
<TextView android:layout_marginLeft="5dp"
android:id="@+id/overview_basebasal" android:layout_marginRight="5dp"
android:layout_width="wrap_content" android:paddingBottom="3dp"
android:layout_height="wrap_content" android:paddingTop="3dp"
android:layout_gravity="left" android:gravity="center_vertical|center_horizontal"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:text="@string/initializing"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/overview_statuslights"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/overview_canulaage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_insulinage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_reservoirlevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_sensorage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_batterylevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
</LinearLayout>
<TextView
android:id="@+id/overview_extendedbolus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white" />
<com.google.android.flexbox.FlexboxLayout 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="wrap_content"
app:alignContent="center"
app:alignItems="center"
app:flexDirection="row"
app:flexWrap="wrap"
app:justifyContent="space_around">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_weight="0"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/overview_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="6dp"
android:text="00.0"
android:textSize="42sp"
android:textStyle="bold" />
<TextView
android:id="@+id/overview_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="-5dp"
android:layout_marginEnd="4dp"
android:paddingStart="-2dp"
android:paddingEnd="0dp"
android:text="→"
android:textSize="28sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginTop="2dp"
android:layout_marginBottom="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/overview_timeago"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="-2dp"
android:paddingStart="2dp"
android:layout_weight="0.5"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_delta"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="-2dp"
android:paddingStart="2dp"
android:layout_weight="0.5"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginTop="6dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="@string/iob"
android:textSize="16sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_iob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:text=""
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="@string/cob"
android:textSize="16sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_cob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text=""
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="@string/basal_short"
android:textSize="16sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_basebasal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="0.50U/h @17:35 1/30min - 0.40U/h"
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="AS"
android:textSize="16sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text=""
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/overview_statuslights"
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:orientation="horizontal">
<TextView <TextView
android:id="@+id/overview_canulaage"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/iob" android:layout_weight="1"
android:textSize="14sp" /> android:gravity="center"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text=":" />
<TextView
android:id="@+id/overview_iob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:text="" android:text=""
android:textSize="14sp" /> android:textSize="14sp" />
<TextView
android:id="@+id/overview_insulinage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_reservoirlevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_sensorage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_batterylevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="wrap_content" <TextView
android:id="@+id/overview_extendedbolus"
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:textAlignment="center"
<TextView android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content" android:textColor="@color/mdtp_white" />
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:text="@string/cob" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text=":" />
<TextView
android:id="@+id/overview_cob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:text="@string/as" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text=":" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:text="" />
</LinearLayout>
</com.google.android.flexbox.FlexboxLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -367,23 +387,35 @@
</RelativeLayout> </RelativeLayout>
<com.jjoe64.graphview.GraphView <com.jjoe64.graphview.GraphView
android:id="@+id/overview_iobgraph" android:id="@+id/overview_iobgraph"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="150dp" /> android:layout_height="100dp"
android:visibility="gone" />
</LinearLayout> </LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/overview_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:id="@+id/overview_accepttemplayout" android:id="@+id/overview_accepttemplayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal"
android:visibility="gone">
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_accepttempbutton" android:id="@+id/overview_accepttempbutton"
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:layout_marginTop="3dp" android:layout_marginTop="3dp"
@ -395,8 +427,8 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingRight="5dp" android:orientation="horizontal"
android:orientation="horizontal"> android:paddingRight="5dp">
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_treatmentbutton" android:id="@+id/overview_treatmentbutton"
@ -410,7 +442,8 @@
android:paddingRight="0dp" android:paddingRight="0dp"
android:text="@string/overview_treatment_label" android:text="@string/overview_treatment_label"
android:textColor="@color/colorTreatmentButton" android:textColor="@color/colorTreatmentButton"
android:textSize="10sp" /> android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_insulinbutton" android:id="@+id/overview_insulinbutton"
@ -439,7 +472,8 @@
android:paddingRight="0dp" android:paddingRight="0dp"
android:text="@string/overview_carbs_label" android:text="@string/overview_carbs_label"
android:textColor="@color/colorCarbsButton" android:textColor="@color/colorCarbsButton"
android:textSize="10sp" /> android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_wizardbutton" android:id="@+id/overview_wizardbutton"
@ -483,7 +517,8 @@
android:paddingRight="0dp" android:paddingRight="0dp"
android:text="@string/overview_cgm" android:text="@string/overview_cgm"
android:textColor="@color/colorCalibrationButton" android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"/> android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_quickwizardbutton" android:id="@+id/overview_quickwizardbutton"
@ -503,6 +538,5 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</RelativeLayout>
</ScrollView>
</FrameLayout> </FrameLayout>

View file

@ -14,7 +14,7 @@
<color name="activity">#d3f166</color> <color name="activity">#d3f166</color>
<color name="devslopepos">#FFFFFF00</color> <color name="devslopepos">#FFFFFF00</color>
<color name="devslopeneg">#FFFF00FF</color> <color name="devslopeneg">#FFFF00FF</color>
<color name="inrange">#00FF00</color> <color name="inrange">#A4ECEA</color>
<color name="low">#FF0000</color> <color name="low">#FF0000</color>
<color name="high">#FFFF00</color> <color name="high">#FFFF00</color>
<color name="actionsConfirm">#FFFF00</color> <color name="actionsConfirm">#FFFF00</color>