public void setPreset(int left, int right, int top, int bottom) { Preset p = checkPreset(left, right, top, bottom); if (p != null) { spinner_presets.setSelection(p.getId()); // Toast.makeText(this, "" + p.getId(), Toast.LENGTH_SHORT).show(); } }