average delta
This commit is contained in:
parent
527a0ffd92
commit
d70c9673d5
2 changed files with 16 additions and 3 deletions
|
@ -99,6 +99,7 @@ public class OverviewFragment extends Fragment {
|
||||||
TextView arrowView;
|
TextView arrowView;
|
||||||
TextView timeAgoView;
|
TextView timeAgoView;
|
||||||
TextView deltaView;
|
TextView deltaView;
|
||||||
|
TextView avgdeltaView;
|
||||||
TextView runningTempView;
|
TextView runningTempView;
|
||||||
TextView baseBasalView;
|
TextView baseBasalView;
|
||||||
TextView activeProfileView;
|
TextView activeProfileView;
|
||||||
|
@ -143,6 +144,7 @@ public class OverviewFragment extends Fragment {
|
||||||
arrowView = (TextView) view.findViewById(R.id.overview_arrow);
|
arrowView = (TextView) view.findViewById(R.id.overview_arrow);
|
||||||
timeAgoView = (TextView) view.findViewById(R.id.overview_timeago);
|
timeAgoView = (TextView) view.findViewById(R.id.overview_timeago);
|
||||||
deltaView = (TextView) view.findViewById(R.id.overview_delta);
|
deltaView = (TextView) view.findViewById(R.id.overview_delta);
|
||||||
|
avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta);
|
||||||
runningTempView = (TextView) view.findViewById(R.id.overview_runningtemp);
|
runningTempView = (TextView) view.findViewById(R.id.overview_runningtemp);
|
||||||
baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal);
|
baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal);
|
||||||
activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile);
|
activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile);
|
||||||
|
@ -570,8 +572,11 @@ public class OverviewFragment extends Fragment {
|
||||||
bgView.setText(lastBG.valueToUnitsToString(profile.getUnits()));
|
bgView.setText(lastBG.valueToUnitsToString(profile.getUnits()));
|
||||||
arrowView.setText(lastBG.directionToSymbol());
|
arrowView.setText(lastBG.directionToSymbol());
|
||||||
DatabaseHelper.GlucoseStatus glucoseStatus = MainApp.getDbHelper().getGlucoseStatusData();
|
DatabaseHelper.GlucoseStatus glucoseStatus = MainApp.getDbHelper().getGlucoseStatusData();
|
||||||
if (glucoseStatus != null)
|
if (glucoseStatus != null){
|
||||||
deltaView.setText("Δ " + NSProfile.toUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units) + " " + units);
|
deltaView.setText("Δ " + NSProfile.toUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units) + " " + units);
|
||||||
|
avgdeltaView.setText("øΔ " + NSProfile.toUnitsString(glucoseStatus.avgdelta, glucoseStatus.avgdelta * Constants.MGDL_TO_MMOLL, units) + " " + units);
|
||||||
|
}
|
||||||
|
|
||||||
BgReading.units = profile.getUnits();
|
BgReading.units = profile.getUnits();
|
||||||
} else
|
} else
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
android:layout_gravity="top|left"
|
android:layout_gravity="top|left"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="00.0"
|
android:text="00.0"
|
||||||
android:textSize="80dp"
|
android:textSize="70dp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
android:paddingLeft="-5dp"
|
android:paddingLeft="-5dp"
|
||||||
android:paddingRight="-5dp"
|
android:paddingRight="-5dp"
|
||||||
android:text="→"
|
android:text="→"
|
||||||
android:textSize="80dp"
|
android:textSize="60dp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -90,6 +90,14 @@
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_avgdelta"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/overview_activeprofile"
|
android:id="@+id/overview_activeprofile"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
Loading…
Reference in a new issue