preselect key if only a single one is available

This commit is contained in:
Vincent Breitmoser 2018-07-02 14:06:06 +02:00
parent 19dfac7fc9
commit a02251274b

View file

@ -101,6 +101,10 @@ public class KeySpinner extends AppCompatSpinner {
}
private void maybeSelectPreselection(List<UnifiedKeyInfo> keyInfos) {
if (spinnerAdapter.hasNoneItem() && keyInfos.size() == 1) {
setSelection(1);
return;
}
if (preSelectedKeyId == null) {
return;
}