Merge branch 'dev' into history

This commit is contained in:
Milos Kozak 2017-05-12 23:04:39 +02:00
commit 6a6a02f212
5 changed files with 6 additions and 12 deletions

View file

@ -233,8 +233,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
profileList = profile.getProfileList(); profileList = profile.getProfileList();
} }
ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(getContext(), ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(getContext(),
android.R.layout.simple_spinner_item, profileList); R.layout.spinner_centered, profileList);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
profileSpinner.setAdapter(adapter); profileSpinner.setAdapter(adapter);
if (profile != null) { if (profile != null) {
// set selected to actual profile // set selected to actual profile
@ -250,8 +249,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
reasonList.add(MainApp.sResources.getString(R.string.activity)); reasonList.add(MainApp.sResources.getString(R.string.activity));
reasonList.add(MainApp.sResources.getString(R.string.manual)); reasonList.add(MainApp.sResources.getString(R.string.manual));
ArrayAdapter<CharSequence> adapterReason = new ArrayAdapter<CharSequence>(getContext(), ArrayAdapter<CharSequence> adapterReason = new ArrayAdapter<CharSequence>(getContext(),
android.R.layout.simple_spinner_item, reasonList); R.layout.spinner_centered, reasonList);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
reasonSpinner.setAdapter(adapterReason); reasonSpinner.setAdapter(adapterReason);
// bg // bg

View file

@ -71,8 +71,7 @@ public class EditQuickWizardDialog extends DialogFragment implements View.OnClic
timeList.add(DateUtil.timeString(DateUtil.toDate(24 * 60 * 60 - 60))); timeList.add(DateUtil.timeString(DateUtil.toDate(24 * 60 * 60 - 60)));
ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(getContext(), ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(getContext(),
android.R.layout.simple_spinner_item, timeList); R.layout.spinner_centered, timeList);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
fromSpinner.setAdapter(adapter); fromSpinner.setAdapter(adapter);
toSpinner.setAdapter(adapter); toSpinner.setAdapter(adapter);

View file

@ -169,8 +169,7 @@ public class DanaRHistoryActivity extends Activity {
typeList.add(new TypeList(RecordTypes.RECORD_TYPE_REFILL, getString(R.string.danar_history_refill))); typeList.add(new TypeList(RecordTypes.RECORD_TYPE_REFILL, getString(R.string.danar_history_refill)));
typeList.add(new TypeList(RecordTypes.RECORD_TYPE_SUSPEND, getString(R.string.danar_history_syspend))); typeList.add(new TypeList(RecordTypes.RECORD_TYPE_SUSPEND, getString(R.string.danar_history_syspend)));
ArrayAdapter<TypeList> spinnerAdapter = new ArrayAdapter<>(this, ArrayAdapter<TypeList> spinnerAdapter = new ArrayAdapter<>(this,
android.R.layout.simple_spinner_item, typeList); R.layout.spinner_centered, typeList);
spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
historyTypeSpinner.setAdapter(spinnerAdapter); historyTypeSpinner.setAdapter(spinnerAdapter);
reloadButton.setOnClickListener(new View.OnClickListener() { reloadButton.setOnClickListener(new View.OnClickListener() {

View file

@ -168,8 +168,7 @@ public class DanaRHistoryActivity extends Activity {
typeList.add(new TypeList(RecordTypes.RECORD_TYPE_GLUCOSE, getString(R.string.danar_history_glucose))); typeList.add(new TypeList(RecordTypes.RECORD_TYPE_GLUCOSE, getString(R.string.danar_history_glucose)));
ArrayAdapter<TypeList> spinnerAdapter = new ArrayAdapter<>(this, ArrayAdapter<TypeList> spinnerAdapter = new ArrayAdapter<>(this,
android.R.layout.simple_spinner_item, typeList); R.layout.spinner_centered, typeList);
spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
historyTypeSpinner.setAdapter(spinnerAdapter); historyTypeSpinner.setAdapter(spinnerAdapter);
reloadButton.setOnClickListener(new View.OnClickListener() { reloadButton.setOnClickListener(new View.OnClickListener() {

View file

@ -229,8 +229,7 @@ public class TimeListEdit {
} }
ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(context, ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(context,
android.R.layout.simple_spinner_item, timeList); R.layout.spinner_centered, timeList);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter); spinner.setAdapter(adapter);
spinner.setSelection(posInList, false); spinner.setSelection(posInList, false);
} }