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