Update InsulinFastactingFragment.java
... in case DIA has changed
This commit is contained in:
parent
435ec55580
commit
741f6bd866
1 changed files with 14 additions and 4 deletions
|
@ -35,12 +35,22 @@ public class InsulinFastactingFragment extends Fragment {
|
||||||
insulinDia = (TextView) view.findViewById(R.id.insulin_dia);
|
insulinDia = (TextView) view.findViewById(R.id.insulin_dia);
|
||||||
insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph);
|
insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph);
|
||||||
|
|
||||||
insulinName.setText(insulinFastactingPlugin.getFriendlyName());
|
updateGUI();
|
||||||
insulinComment.setText(insulinFastactingPlugin.getComment());
|
|
||||||
insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + new Double(insulinFastactingPlugin.getDia()).toString() + "h");
|
|
||||||
insulinGraph.show(insulinFastactingPlugin);
|
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
updateGUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateGUI() {
|
||||||
|
insulinName.setText(insulinFastactingPlugin.getFriendlyName());
|
||||||
|
insulinComment.setText(insulinFastactingPlugin.getComment());
|
||||||
|
insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + new Double(insulinFastactingPlugin.getDia()).toString() + "h");
|
||||||
|
insulinGraph.show(insulinFastactingPlugin);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue