diff options
Diffstat (limited to 'src/main/java/eu/siacs')
3 files changed, 9 insertions, 10 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index b6341275..3d7eb1cc 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -593,7 +593,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate } if (Config.DOMAIN_LOCK == null) { final KnownHostsAdapter mKnownHostsAdapter = new KnownHostsAdapter(this, - android.R.layout.simple_list_item_1, + R.layout.simple_list_item, xmppConnectionService.getKnownHosts()); this.mAccountJid.setAdapter(mKnownHostsAdapter); } diff --git a/src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java b/src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java index 89000a68..f77d9c0a 100644 --- a/src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java +++ b/src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java @@ -50,7 +50,7 @@ public class EnterJidDialog { jabberIdDesc.setText(R.string.account_settings_jabber_id); final Spinner spinner = (Spinner) dialogView.findViewById(R.id.account); final AutoCompleteTextView jid = (AutoCompleteTextView) dialogView.findViewById(R.id.jid); - jid.setAdapter(new KnownHostsAdapter(context, android.R.layout.simple_list_item_1, knownHosts)); + jid.setAdapter(new KnownHostsAdapter(context, R.layout.simple_list_item, knownHosts)); if (prefilledJid != null) { jid.append(prefilledJid); if (!allowEditJid) { @@ -67,10 +67,10 @@ public class EnterJidDialog { StartConversationActivity.populateAccountSpinner(context, activatedAccounts, spinner); } else { ArrayAdapter<String> adapter = new ArrayAdapter<>(context, - android.R.layout.simple_spinner_item, + R.layout.simple_list_item, new String[] { account }); spinner.setEnabled(false); - adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + adapter.setDropDownViewResource(R.layout.simple_list_item); spinner.setAdapter(adapter); } diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index 558a9672..78c05e41 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -393,7 +393,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU final TextView jabberIdDesc = (TextView) dialogView.findViewById(R.id.jabber_id); jabberIdDesc.setText(R.string.conference_address); jid.setHint(R.string.conference_address_example); - jid.setAdapter(new KnownHostsAdapter(this, android.R.layout.simple_list_item_1, mKnownConferenceHosts)); + jid.setAdapter(new KnownHostsAdapter(this, R.layout.simple_list_item, mKnownConferenceHosts)); if (prefilledJid != null) { jid.append(prefilledJid); } @@ -487,16 +487,15 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU public static void populateAccountSpinner(Context context, List<String> accounts, Spinner spinner) { if (accounts.size() > 0) { - ArrayAdapter<String> adapter = new ArrayAdapter<>(context, - android.R.layout.simple_spinner_item, accounts); - adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + ArrayAdapter<String> adapter = new ArrayAdapter<>(context, R.layout.simple_list_item, accounts); + adapter.setDropDownViewResource(R.layout.simple_list_item); spinner.setAdapter(adapter); spinner.setEnabled(true); } else { ArrayAdapter<String> adapter = new ArrayAdapter<>(context, - android.R.layout.simple_spinner_item, + R.layout.simple_list_item, Arrays.asList(new String[]{context.getString(R.string.no_accounts)})); - adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + adapter.setDropDownViewResource(R.layout.simple_list_item); spinner.setAdapter(adapter); spinner.setEnabled(false); } |