initialize current profile in careportal
This commit is contained in:
parent
87055bef0b
commit
23e8220b12
1 changed files with 7 additions and 0 deletions
|
@ -221,6 +221,13 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
||||||
android.R.layout.simple_spinner_item, profileList);
|
android.R.layout.simple_spinner_item, profileList);
|
||||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
profileSpinner.setAdapter(adapter);
|
profileSpinner.setAdapter(adapter);
|
||||||
|
if (profile != null) {
|
||||||
|
// set selected to actual profile
|
||||||
|
for (int p = 0; p < profileList.size(); p++) {
|
||||||
|
if (profileList.get(p).equals(profile.getActiveProfile()))
|
||||||
|
profileSpinner.setSelection(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bgUnitsView.setText(units);
|
bgUnitsView.setText(units);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue