draw profile in dana profile viewer
This commit is contained in:
parent
d31c9a6ed6
commit
b481e77008
2 changed files with 6 additions and 2 deletions
|
@ -26,6 +26,7 @@ import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPlugin;
|
||||||
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump;
|
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump;
|
||||||
import info.nightscout.androidaps.plugins.PumpDanaRKorean.DanaRKoreanPlugin;
|
import info.nightscout.androidaps.plugins.PumpDanaRKorean.DanaRKoreanPlugin;
|
||||||
import info.nightscout.androidaps.plugins.PumpDanaRv2.DanaRv2Plugin;
|
import info.nightscout.androidaps.plugins.PumpDanaRv2.DanaRv2Plugin;
|
||||||
|
import info.nightscout.androidaps.plugins.Treatments.fragments.ProfileGraph;
|
||||||
import info.nightscout.utils.DecimalFormatter;
|
import info.nightscout.utils.DecimalFormatter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,6 +43,8 @@ public class ProfileViewDialog extends DialogFragment {
|
||||||
private TextView isf;
|
private TextView isf;
|
||||||
private TextView basal;
|
private TextView basal;
|
||||||
private TextView target;
|
private TextView target;
|
||||||
|
private ProfileGraph basalGraph;
|
||||||
|
|
||||||
|
|
||||||
private Button refreshButton;
|
private Button refreshButton;
|
||||||
|
|
||||||
|
@ -70,7 +73,7 @@ public class ProfileViewDialog extends DialogFragment {
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
basalGraph = (ProfileGraph) layout.findViewById(R.id.basal_graph);
|
||||||
setContent();
|
setContent();
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
@ -90,6 +93,7 @@ public class ProfileViewDialog extends DialogFragment {
|
||||||
// }
|
// }
|
||||||
ProfileStore store = ((ProfileInterface)MainApp.getConfigBuilder().getActivePump()).getProfile();
|
ProfileStore store = ((ProfileInterface)MainApp.getConfigBuilder().getActivePump()).getProfile();
|
||||||
if (store != null) {
|
if (store != null) {
|
||||||
|
store.getDefaultProfile();
|
||||||
noProfile.setVisibility(View.GONE);
|
noProfile.setVisibility(View.GONE);
|
||||||
Profile profile = store.getDefaultProfile();
|
Profile profile = store.getDefaultProfile();
|
||||||
units.setText(profile.getUnits());
|
units.setText(profile.getUnits());
|
||||||
|
@ -99,6 +103,7 @@ public class ProfileViewDialog extends DialogFragment {
|
||||||
isf.setText(profile.getIsfList());
|
isf.setText(profile.getIsfList());
|
||||||
basal.setText(profile.getBasalList());
|
basal.setText(profile.getBasalList());
|
||||||
target.setText(profile.getTargetList());
|
target.setText(profile.getTargetList());
|
||||||
|
basalGraph.show(store.getDefaultProfile());
|
||||||
} else {
|
} else {
|
||||||
noProfile.setVisibility(View.VISIBLE);
|
noProfile.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,6 @@ public class ProfileViewerDialog extends DialogFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
|
||||||
ViewGroup.LayoutParams params = getDialog().getWindow().getAttributes();
|
ViewGroup.LayoutParams params = getDialog().getWindow().getAttributes();
|
||||||
params.width = ViewGroup.LayoutParams.MATCH_PARENT;
|
params.width = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||||
params.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
params.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||||
|
|
Loading…
Reference in a new issue