diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-03-22 19:50:55 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-03-22 19:50:55 +0100 |
commit | 28c26877fb51a3d45d6248abf51daf765affb7eb (patch) | |
tree | d378788283005d0d3a7c1ac95538cbc3aa01bc15 | |
parent | 899f8b618569925921eebba108e6a62acfaf3e9c (diff) |
don't use autocomplete in MagicCreateActivity for username
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java | 8 | ||||
-rw-r--r-- | src/main/res/layout/magic_create.xml | 3 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java b/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java index 84c34d525..7f4531b41 100644 --- a/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java +++ b/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java @@ -6,25 +6,23 @@ import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.View; -import android.widget.AutoCompleteTextView; import android.widget.Button; +import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import java.security.SecureRandom; -import java.util.List; import de.pixart.messenger.Config; import de.pixart.messenger.R; import de.pixart.messenger.entities.Account; -import de.pixart.messenger.ui.adapter.KnownHostsAdapter; import de.pixart.messenger.xmpp.jid.InvalidJidException; import de.pixart.messenger.xmpp.jid.Jid; public class MagicCreateActivity extends XmppActivity implements TextWatcher { private TextView mFullJidDisplay; - private AutoCompleteTextView mUsername; + private EditText mUsername; private SecureRandom mRandom; private static final String CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456780+-/#$!?"; @@ -55,11 +53,9 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } super.onCreate(savedInstanceState); - List<String> knownHosts = null; setContentView(R.layout.magic_create); mFullJidDisplay = findViewById(R.id.full_jid); mUsername = findViewById(R.id.username); - mUsername.setAdapter(new KnownHostsAdapter(this, R.layout.simple_list_item, knownHosts)); mRandom = new SecureRandom(); Button next = findViewById(R.id.create_account); next.setOnClickListener(v -> { diff --git a/src/main/res/layout/magic_create.xml b/src/main/res/layout/magic_create.xml index 35307cfed..ec3bfefff 100644 --- a/src/main/res/layout/magic_create.xml +++ b/src/main/res/layout/magic_create.xml @@ -43,13 +43,12 @@ android:textColor="@color/black87" android:textSize="?attr/TextSizeBody" /> - <AutoCompleteTextView + <EditText android:id="@+id/username" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:hint="@string/username_hint" - android:inputType="textNoSuggestions" android:textSize="?attr/TextSizeBody" /> <TextView |