aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-04-29 13:48:30 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-04-29 13:48:30 +0200
commitc7882b7225bc9615aa69066c3182014992ad24d1 (patch)
tree5eeb910a4ac7fa011e336978fd6d98d702c1589b /src/main/java/eu
parent6d9ca2591575a5e04d554a168e45413a628f6540 (diff)
port all android drop down list items to our own
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EnterJidDialog.java6
-rw-r--r--src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java11
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 b63412752..3d7eb1ccc 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 89000a685..f77d9c0a8 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 558a96727..78c05e41d 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);
}