Small layout improvements
This commit is contained in:
parent
23de3b0a3b
commit
dec6dcf63d
2 changed files with 17 additions and 22 deletions
|
@ -1045,7 +1045,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
if (deltaShortView != null)
|
if (deltaShortView != null)
|
||||||
deltaShortView.setText(Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units));
|
deltaShortView.setText(Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units));
|
||||||
if (avgdeltaView != null)
|
if (avgdeltaView != null)
|
||||||
avgdeltaView.setText("øΔ15m: " + Profile.toUnitsString(glucoseStatus.short_avgdelta, glucoseStatus.short_avgdelta * Constants.MGDL_TO_MMOLL, units) +
|
avgdeltaView.setText("øΔ15m: " + Profile.toUnitsString(glucoseStatus.short_avgdelta, glucoseStatus.short_avgdelta * Constants.MGDL_TO_MMOLL, units) + "\n" +
|
||||||
"øΔ40m: " + Profile.toUnitsString(glucoseStatus.long_avgdelta, glucoseStatus.long_avgdelta * Constants.MGDL_TO_MMOLL, units));
|
"øΔ40m: " + Profile.toUnitsString(glucoseStatus.long_avgdelta, glucoseStatus.long_avgdelta * Constants.MGDL_TO_MMOLL, units));
|
||||||
} else {
|
} else {
|
||||||
if (deltaView != null)
|
if (deltaView != null)
|
||||||
|
@ -1155,14 +1155,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
} else {
|
} else {
|
||||||
basalText = MainApp.gs(R.string.pump_basebasalrate, profile.getBasal());
|
basalText = MainApp.gs(R.string.pump_basebasalrate, profile.getBasal());
|
||||||
}
|
}
|
||||||
baseBasalView.setOnClickListener(v -> {
|
|
||||||
String fullText = MainApp.gs(R.string.pump_basebasalrate_label) + ": " + MainApp.gs(R.string.pump_basebasalrate,profile.getBasal()) + "\n";
|
|
||||||
if (activeTemp != null) {
|
|
||||||
fullText += MainApp.gs(R.string.pump_tempbasal_label) + ": " + activeTemp.toStringFull();
|
|
||||||
}
|
|
||||||
OKDialog.show(getActivity(), MainApp.gs(R.string.basal), fullText);
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
basalText = activeTemp.toStringFull();
|
basalText = activeTemp.toStringFull();
|
||||||
|
@ -1171,6 +1163,14 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
baseBasalView.setText(basalText);
|
baseBasalView.setText(basalText);
|
||||||
|
baseBasalView.setOnClickListener(v -> {
|
||||||
|
String fullText = MainApp.gs(R.string.pump_basebasalrate_label) + ": " + MainApp.gs(R.string.pump_basebasalrate, profile.getBasal()) + "\n";
|
||||||
|
if (activeTemp != null) {
|
||||||
|
fullText += MainApp.gs(R.string.pump_tempbasal_label) + ": " + activeTemp.toStringFull();
|
||||||
|
}
|
||||||
|
OKDialog.show(getActivity(), MainApp.gs(R.string.basal), fullText);
|
||||||
|
});
|
||||||
|
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
baseBasalView.setTextColor(MainApp.gc(R.color.basal));
|
baseBasalView.setTextColor(MainApp.gc(R.color.basal));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1191,9 +1191,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
extendedBolusView.setText(extendedBolusText);
|
extendedBolusView.setText(extendedBolusText);
|
||||||
if (Config.NSCLIENT) {
|
|
||||||
extendedBolusView.setOnClickListener(v -> OKDialog.show(getActivity(), MainApp.gs(R.string.extended_bolus), extendedBolus.toString()));
|
extendedBolusView.setOnClickListener(v -> OKDialog.show(getActivity(), MainApp.gs(R.string.extended_bolus), extendedBolus.toString()));
|
||||||
}
|
|
||||||
if (extendedBolusText.equals(""))
|
if (extendedBolusText.equals(""))
|
||||||
extendedBolusView.setVisibility(Config.NSCLIENT ? View.INVISIBLE : View.GONE);
|
extendedBolusView.setVisibility(Config.NSCLIENT ? View.INVISIBLE : View.GONE);
|
||||||
else
|
else
|
||||||
|
|
|
@ -150,22 +150,20 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/overview_timeago"
|
android:id="@+id/overview_timeago"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="-2dp"
|
android:layout_marginTop="-2dp"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:layout_weight="0.5"
|
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/overview_delta"
|
android:id="@+id/overview_delta"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="-2dp"
|
android:layout_marginTop="-2dp"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:layout_weight="0.5"
|
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -173,8 +171,7 @@
|
||||||
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_marginLeft="10dp"
|
||||||
android:layout_weight="0.5"
|
android:textSize="14sp"/>
|
||||||
android:textSize="12sp"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue