chart menu 3
This commit is contained in:
parent
21c3853461
commit
067b264ae8
|
@ -126,7 +126,7 @@ import info.nightscout.utils.SP;
|
|||
import info.nightscout.utils.SingleClickButton;
|
||||
import info.nightscout.utils.ToastUtils;
|
||||
|
||||
public class OverviewFragment extends Fragment implements View.OnClickListener, CompoundButton.OnCheckedChangeListener, View.OnLongClickListener {
|
||||
public class OverviewFragment extends Fragment implements View.OnClickListener, View.OnLongClickListener {
|
||||
private static Logger log = LoggerFactory.getLogger(OverviewFragment.class);
|
||||
|
||||
TextView timeView;
|
||||
|
@ -157,20 +157,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
TextView sage;
|
||||
TextView pbage;
|
||||
|
||||
TextView showPredictionLabel;
|
||||
TextView showBasalsLabel;
|
||||
CheckBox showBasalsCheckbox;
|
||||
TextView showIobLabel;
|
||||
CheckBox showIobCheckbox;
|
||||
TextView showCobLabel;
|
||||
CheckBox showCobCheckbox;
|
||||
TextView showDeviationsLabel;
|
||||
CheckBox showDeviationsCheckbox;
|
||||
TextView showRatiosLabel;
|
||||
CheckBox showRatiosCheckbox;
|
||||
CheckBox showPredictionCheckbox;
|
||||
|
||||
|
||||
RecyclerView notificationsView;
|
||||
LinearLayoutManager llm;
|
||||
|
||||
|
@ -295,38 +281,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
|
||||
acceptTempLayout = (LinearLayout) view.findViewById(R.id.overview_accepttemplayout);
|
||||
|
||||
showPredictionCheckbox = (CheckBox) view.findViewById(R.id.overview_showprediction);
|
||||
showBasalsCheckbox = (CheckBox) view.findViewById(R.id.overview_showbasals);
|
||||
showIobCheckbox = (CheckBox) view.findViewById(R.id.overview_showiob);
|
||||
showCobCheckbox = (CheckBox) view.findViewById(R.id.overview_showcob);
|
||||
showDeviationsCheckbox = (CheckBox) view.findViewById(R.id.overview_showdeviations);
|
||||
showRatiosCheckbox = (CheckBox) view.findViewById(R.id.overview_showratios);
|
||||
showPredictionCheckbox.setChecked(SP.getBoolean("showprediction", false));
|
||||
showBasalsCheckbox.setChecked(SP.getBoolean("showbasals", true));
|
||||
showIobCheckbox.setChecked(SP.getBoolean("showiob", false));
|
||||
showCobCheckbox.setChecked(SP.getBoolean("showcob", false));
|
||||
showDeviationsCheckbox.setChecked(SP.getBoolean("showdeviations", false));
|
||||
showRatiosCheckbox.setChecked(SP.getBoolean("showratios", false));
|
||||
showPredictionCheckbox.setOnCheckedChangeListener(this);
|
||||
showBasalsCheckbox.setOnCheckedChangeListener(this);
|
||||
showIobCheckbox.setOnCheckedChangeListener(this);
|
||||
showCobCheckbox.setOnCheckedChangeListener(this);
|
||||
showDeviationsCheckbox.setOnCheckedChangeListener(this);
|
||||
showRatiosCheckbox.setOnCheckedChangeListener(this);
|
||||
|
||||
showPredictionLabel = (TextView) view.findViewById(R.id.overview_showprediction_label);
|
||||
showPredictionLabel.setOnClickListener(this);
|
||||
showBasalsLabel = (TextView) view.findViewById(R.id.overview_showbasals_label);
|
||||
showBasalsLabel.setOnClickListener(this);
|
||||
showIobLabel = (TextView) view.findViewById(R.id.overview_showiob_label);
|
||||
showIobLabel.setOnClickListener(this);
|
||||
showCobLabel = (TextView) view.findViewById(R.id.overview_showcob_label);
|
||||
showCobLabel.setOnClickListener(this);
|
||||
showDeviationsLabel = (TextView) view.findViewById(R.id.overview_showdeviations_label);
|
||||
showDeviationsLabel.setOnClickListener(this);
|
||||
showRatiosLabel = (TextView) view.findViewById(R.id.overview_showratios_label);
|
||||
showRatiosLabel.setOnClickListener(this);
|
||||
|
||||
notificationsView = (RecyclerView) view.findViewById(R.id.overview_notifications);
|
||||
notificationsView.setHasFixedSize(true);
|
||||
llm = new LinearLayoutManager(view.getContext());
|
||||
|
@ -382,15 +336,23 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
chartButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
PopupMenu popup = new PopupMenu(v.getContext(), v);
|
||||
MenuItem item = popup.getMenu().add(Menu.NONE, CHARTTYPE.PRE.ordinal(), Menu.NONE, "Predictions");
|
||||
CharSequence title = item.getTitle();
|
||||
SpannableString s = new SpannableString(title);
|
||||
s.setSpan(new ForegroundColorSpan(ResourcesCompat.getColor(getResources(), R.color.prediction, null)),0, s.length(), 0);
|
||||
item.setTitle(s);
|
||||
item.setCheckable(true);
|
||||
item.setChecked(SP.getBoolean("showprediction", false));
|
||||
final LoopPlugin.LastRun finalLastRun = LoopPlugin.lastRun;
|
||||
final boolean predictionsAvailable = finalLastRun != null && finalLastRun.request.hasPredictions;
|
||||
|
||||
MenuItem item;
|
||||
CharSequence title;
|
||||
SpannableString s;
|
||||
PopupMenu popup = new PopupMenu(v.getContext(), v);
|
||||
|
||||
if(predictionsAvailable) {
|
||||
item = popup.getMenu().add(Menu.NONE, CHARTTYPE.PRE.ordinal(), Menu.NONE, "Predictions");
|
||||
title = item.getTitle();
|
||||
s = new SpannableString(title);
|
||||
s.setSpan(new ForegroundColorSpan(ResourcesCompat.getColor(getResources(), R.color.prediction, null)), 0, s.length(), 0);
|
||||
item.setTitle(s);
|
||||
item.setCheckable(true);
|
||||
item.setChecked(SP.getBoolean("showprediction", true));
|
||||
}
|
||||
|
||||
item = popup.getMenu().add(Menu.NONE, CHARTTYPE.BAS.ordinal(), Menu.NONE, "Basals");
|
||||
title = item.getTitle();
|
||||
|
@ -406,7 +368,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
s.setSpan(new ForegroundColorSpan(ResourcesCompat.getColor(getResources(), R.color.iob, null)), 0, s.length(), 0);
|
||||
item.setTitle(s);
|
||||
item.setCheckable(true);
|
||||
item.setChecked(SP.getBoolean("showiob", false));
|
||||
item.setChecked(SP.getBoolean("showiob", true));
|
||||
|
||||
item = popup.getMenu().add(Menu.NONE, CHARTTYPE.COB.ordinal(), Menu.NONE, "Carbs On Board");
|
||||
title = item.getTitle();
|
||||
|
@ -414,7 +376,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
s.setSpan(new ForegroundColorSpan(ResourcesCompat.getColor(getResources(), R.color.cob, null)), 0, s.length(), 0);
|
||||
item.setTitle(s);
|
||||
item.setCheckable(true);
|
||||
item.setChecked(SP.getBoolean("showcob", false));
|
||||
item.setChecked(SP.getBoolean("showcob", true));
|
||||
|
||||
item = popup.getMenu().add(Menu.NONE, CHARTTYPE.DEV.ordinal(), Menu.NONE, "Deviations");
|
||||
title = item.getTitle();
|
||||
|
@ -506,35 +468,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
switch (buttonView.getId()) {
|
||||
case R.id.overview_showprediction:
|
||||
case R.id.overview_showbasals:
|
||||
case R.id.overview_showiob:
|
||||
break;
|
||||
case R.id.overview_showcob:
|
||||
showDeviationsCheckbox.setOnCheckedChangeListener(null);
|
||||
showDeviationsCheckbox.setChecked(false);
|
||||
showDeviationsCheckbox.setOnCheckedChangeListener(this);
|
||||
break;
|
||||
case R.id.overview_showdeviations:
|
||||
showCobCheckbox.setOnCheckedChangeListener(null);
|
||||
showCobCheckbox.setChecked(false);
|
||||
showCobCheckbox.setOnCheckedChangeListener(this);
|
||||
break;
|
||||
case R.id.overview_showratios:
|
||||
break;
|
||||
}
|
||||
SP.putBoolean("showiob", showIobCheckbox.isChecked());
|
||||
SP.putBoolean("showprediction", showPredictionCheckbox.isChecked());
|
||||
SP.putBoolean("showbasals", showBasalsCheckbox.isChecked());
|
||||
SP.putBoolean("showcob", showCobCheckbox.isChecked());
|
||||
SP.putBoolean("showdeviations", showDeviationsCheckbox.isChecked());
|
||||
SP.putBoolean("showratios", showRatiosCheckbox.isChecked());
|
||||
scheduleUpdateGUI("onGraphCheckboxesCheckedChanged");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onContextItemSelected(MenuItem item) {
|
||||
final LoopPlugin activeloop = ConfigBuilderPlugin.getActiveLoop();
|
||||
|
@ -677,24 +610,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
if (ConfigBuilderPlugin.getActivePump().isSuspended() || !ConfigBuilderPlugin.getActivePump().isInitialized())
|
||||
ConfigBuilderPlugin.getCommandQueue().readStatus("RefreshClicked", null);
|
||||
break;
|
||||
case R.id.overview_showprediction_label:
|
||||
showPredictionCheckbox.toggle();
|
||||
break;
|
||||
case R.id.overview_showbasals_label:
|
||||
showBasalsCheckbox.toggle();
|
||||
break;
|
||||
case R.id.overview_showiob_label:
|
||||
showIobCheckbox.toggle();
|
||||
break;
|
||||
case R.id.overview_showcob_label:
|
||||
showCobCheckbox.toggle();
|
||||
break;
|
||||
case R.id.overview_showdeviations_label:
|
||||
showDeviationsCheckbox.toggle();
|
||||
break;
|
||||
case R.id.overview_showratios_label:
|
||||
showRatiosCheckbox.toggle();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1374,14 +1289,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
}
|
||||
|
||||
final boolean predictionsAvailable = finalLastRun != null && finalLastRun.request.hasPredictions;
|
||||
if (predictionsAvailable) {
|
||||
showPredictionCheckbox.setVisibility(View.VISIBLE);
|
||||
showPredictionLabel.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
showPredictionCheckbox.setVisibility(View.GONE);
|
||||
showPredictionLabel.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// pump status from ns
|
||||
if (pumpDeviceStatusView != null) {
|
||||
pumpDeviceStatusView.setText(NSDeviceStatus.getInstance().getPumpStatus());
|
||||
|
@ -1432,7 +1339,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
final long toTime;
|
||||
final long fromTime;
|
||||
final long endTime;
|
||||
if (predictionsAvailable && showPredictionCheckbox.isChecked()) {
|
||||
if (predictionsAvailable && SP.getBoolean("showprediction", false)) {
|
||||
int predHours = (int) (Math.ceil(finalLastRun.constraintsProcessed.getLatestPredictionsTime() - System.currentTimeMillis()) / (60 * 60 * 1000));
|
||||
predHours = Math.min(2, predHours);
|
||||
predHours = Math.max(0, predHours);
|
||||
|
@ -1459,7 +1366,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
graphData.addInRangeArea(fromTime, endTime, lowLine, highLine);
|
||||
|
||||
// **** BG ****
|
||||
if (predictionsAvailable && showPredictionCheckbox.isChecked())
|
||||
if (predictionsAvailable && SP.getBoolean("showprediction", false))
|
||||
graphData.addBgReadings(fromTime, toTime, lowLine, highLine, finalLastRun.constraintsProcessed);
|
||||
else
|
||||
graphData.addBgReadings(fromTime, toTime, lowLine, highLine, null);
|
||||
|
@ -1471,7 +1378,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
graphData.addTreatments(fromTime, endTime);
|
||||
|
||||
// add basal data
|
||||
if (pump.getPumpDescription().isTempBasalCapable && showBasalsCheckbox.isChecked()) {
|
||||
if (pump.getPumpDescription().isTempBasalCapable && SP.getBoolean("showbasals", true)) {
|
||||
graphData.addBasals(fromTime, now, lowLine / graphData.maxY / 1.2d);
|
||||
}
|
||||
|
||||
|
@ -1492,25 +1399,25 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
boolean useRatioForScale = false;
|
||||
boolean useDSForScale = false;
|
||||
|
||||
if (showIobCheckbox.isChecked()) {
|
||||
if (SP.getBoolean("showiob", true)) {
|
||||
useIobForScale = true;
|
||||
} else if (showCobCheckbox.isChecked()) {
|
||||
} else if (SP.getBoolean("showcob", true)) {
|
||||
useCobForScale = true;
|
||||
} else if (showDeviationsCheckbox.isChecked()) {
|
||||
} else if (SP.getBoolean("showdeviations", false)) {
|
||||
useDevForScale = true;
|
||||
} else if (showRatiosCheckbox.isChecked()) {
|
||||
} else if (SP.getBoolean("showratios", false)) {
|
||||
useRatioForScale = true;
|
||||
} else if (Config.displayDeviationSlope) {
|
||||
useDSForScale = true;
|
||||
}
|
||||
|
||||
if (showIobCheckbox.isChecked())
|
||||
if (SP.getBoolean("showiob", true))
|
||||
secondGraphData.addIob(fromTime, now, useIobForScale, 1d);
|
||||
if (showCobCheckbox.isChecked())
|
||||
if (SP.getBoolean("showcob", true))
|
||||
secondGraphData.addCob(fromTime, now, useCobForScale, useCobForScale ? 1d : 0.5d);
|
||||
if (showDeviationsCheckbox.isChecked())
|
||||
if (SP.getBoolean("showdeviations", false))
|
||||
secondGraphData.addDeviations(fromTime, now, useDevForScale, 1d);
|
||||
if (showRatiosCheckbox.isChecked())
|
||||
if (SP.getBoolean("showratios", false))
|
||||
secondGraphData.addRatio(fromTime, now, useRatioForScale, 1d);
|
||||
if (Config.displayDeviationSlope)
|
||||
secondGraphData.addDeviationSlope(fromTime, now, useDSForScale, 1d);
|
||||
|
@ -1526,7 +1433,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (showIobCheckbox.isChecked() || showCobCheckbox.isChecked() || showDeviationsCheckbox.isChecked() || showRatiosCheckbox.isChecked() || Config.displayDeviationSlope) {
|
||||
if (SP.getBoolean("showiob", true) || SP.getBoolean("showcob", true) || SP.getBoolean("showdeviations", false) || SP.getBoolean("showratios", false) || Config.displayDeviationSlope) {
|
||||
iobGraph.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
iobGraph.setVisibility(View.GONE);
|
||||
|
|
|
@ -238,116 +238,6 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showprediction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
app:buttonTint="@color/prediction" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showprediction_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/predictionshortlabel"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/prediction"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showbasals"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
app:buttonTint="@color/basal" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showbasals_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/basalshortlabel"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/basal"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showiob"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
app:buttonTint="@color/iob" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showiob_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/iob"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/iob"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showcob"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
app:buttonTint="@color/cob" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showcob_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/cob"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/cob"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showdeviations"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
app:buttonTint="@color/deviations" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showdeviations_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/dev"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/deviations"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showratios"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showratios_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/ratio_short"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:visibility="gone"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
|
|
|
@ -467,125 +467,31 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showprediction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/prediction" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showprediction_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/predictionshortlabel"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/prediction"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showbasals"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/basal" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showbasals_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/basalshortlabel"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/basal"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showiob"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/iob" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showiob_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/iob"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/iob"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showcob"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/cob" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showcob_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/cob"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/cob"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showdeviations"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/deviations" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showdeviations_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/dev"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/deviations"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showratios"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showratios_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/ratio_short"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/overview_bggraph"
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="160dip" />
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/overview_bggraph"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overview_chartMenuButton"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:paddingTop="5dp"
|
||||
app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/overview_iobgraph"
|
||||
|
|
|
@ -551,116 +551,6 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showprediction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/prediction" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showprediction_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/predictionshortlabel"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/prediction"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showbasals"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/basal" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showbasals_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/basalshortlabel"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/basal"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showiob"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/iob" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showiob_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/iob"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/iob"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showcob"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/cob" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showcob_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/cob"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/cob"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showdeviations"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/deviations" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showdeviations_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/dev"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/deviations"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showratios"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showratios_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/ratio_short"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/overview_graphs_layout"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -668,11 +558,26 @@
|
|||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/overview_bggraph"
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/overview_bggraph"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overview_chartMenuButton"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:paddingTop="5dp"
|
||||
app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/overview_iobgraph"
|
||||
|
|
|
@ -232,125 +232,31 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showprediction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/prediction" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showprediction_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/predictionshortlabel"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/prediction"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showbasals"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/basal" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showbasals_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/basalshortlabel"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/basal"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showiob"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/iob" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showiob_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/iob"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/iob"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showcob"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/cob" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showcob_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/cob"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/cob"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showdeviations"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:buttonTint="@color/deviations" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showdeviations_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/dev"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/deviations"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showratios"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overview_showratios_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/ratio_short"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/overview_bggraph"
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="160dip" />
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/overview_bggraph"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overview_chartMenuButton"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:paddingTop="5dp"
|
||||
app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/overview_iobgraph"
|
||||
|
|
Loading…
Reference in a new issue