make all Spiners centered
This commit is contained in:
parent
bcd5cba962
commit
3f4cf57bbc
5 changed files with 6 additions and 12 deletions
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue