Search in sources :

Example 1 with AutoCompleteTextView

use of android.widget.AutoCompleteTextView in project android-test-demo by abdyer.

the class LoginActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    DemoApplication.getInstance().getGraph().inject(this);
    // Set up the login form.
    mEmailView = (AutoCompleteTextView) findViewById(R.id.email);
    populateAutoComplete();
    mPasswordView = (EditText) findViewById(R.id.password);
    mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {

        @Override
        public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
            if (id == R.id.login || id == EditorInfo.IME_NULL) {
                attemptLogin();
                return true;
            }
            return false;
        }
    });
    Button mEmailSignInButton = (Button) findViewById(R.id.email_sign_in_button);
    mEmailSignInButton.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View view) {
            attemptLogin();
        }
    });
    mLoginFormView = findViewById(R.id.login_form);
    mProgressView = findViewById(R.id.login_progress);
}
Also used : KeyEvent(android.view.KeyEvent) Button(android.widget.Button) OnClickListener(android.view.View.OnClickListener) AutoCompleteTextView(android.widget.AutoCompleteTextView) TextView(android.widget.TextView) View(android.view.View) AutoCompleteTextView(android.widget.AutoCompleteTextView) TextView(android.widget.TextView)

Example 2 with AutoCompleteTextView

use of android.widget.AutoCompleteTextView in project actor-platform by actorapp.

the class SearchViewHacker method setHint.

public static void setHint(SearchView searchView, String hint, int resId, int color, Resources resources) {
    AutoCompleteTextView autoComplete = (AutoCompleteTextView) findView(searchView, "mQueryTextView");
    SpannableStringBuilder stopHint = new SpannableStringBuilder("");
    stopHint.append(hint);
    autoComplete.setHint(stopHint);
    autoComplete.setHintTextColor(color);
}
Also used : SpannableStringBuilder(android.text.SpannableStringBuilder) AutoCompleteTextView(android.widget.AutoCompleteTextView)

Example 3 with AutoCompleteTextView

use of android.widget.AutoCompleteTextView in project android_frameworks_base by ResurrectionRemix.

the class PopupWindowVisibility method onCreate.

@Override
protected void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setContentView(R.layout.popup_window_visibility);
    mFrame = findViewById(R.id.frame);
    mHide = (Button) findViewById(R.id.hide);
    mHide.setOnClickListener(this);
    mShow = (Button) findViewById(R.id.show);
    mShow.setOnClickListener(this);
    Spinner spinner = (Spinner) findViewById(R.id.spinner);
    ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, mStrings);
    spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spinner.setAdapter(spinnerAdapter);
    ArrayAdapter<String> autoAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, COUNTRIES);
    AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.auto);
    textView.setAdapter(autoAdapter);
}
Also used : Spinner(android.widget.Spinner) ArrayAdapter(android.widget.ArrayAdapter) AutoCompleteTextView(android.widget.AutoCompleteTextView)

Example 4 with AutoCompleteTextView

use of android.widget.AutoCompleteTextView in project Synthese_2BIN by TheYoungSensei.

the class LoginActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    CookieManager cookieManager = new CookieManager();
    CookieHandler.setDefault(cookieManager);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    // Set up the login form.
    mEmailView = (AutoCompleteTextView) findViewById(R.id.email);
    populateAutoComplete();
    mPasswordView = (EditText) findViewById(R.id.password);
    mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {

        @Override
        public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
            if (id == R.id.login || id == EditorInfo.IME_NULL) {
                attemptLogin();
                return true;
            }
            return false;
        }
    });
    Button mEmailSignInButton = (Button) findViewById(R.id.email_sign_in_button);
    mEmailSignInButton.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View view) {
            attemptLogin();
        }
    });
    mLoginFormView = findViewById(R.id.login_form);
    mProgressView = findViewById(R.id.login_progress);
}
Also used : KeyEvent(android.view.KeyEvent) Button(android.widget.Button) OnClickListener(android.view.View.OnClickListener) AutoCompleteTextView(android.widget.AutoCompleteTextView) TextView(android.widget.TextView) View(android.view.View) AutoCompleteTextView(android.widget.AutoCompleteTextView) TextView(android.widget.TextView) CookieManager(java.net.CookieManager)

Example 5 with AutoCompleteTextView

use of android.widget.AutoCompleteTextView in project Rocket.Chat.Android by RocketChat.

the class AddDirectMessageDialogFragment method onSetupDialog.

@SuppressLint("RxLeakedSubscription")
@Override
protected void onSetupDialog() {
    View buttonAddDirectMessage = getDialog().findViewById(R.id.btn_add_direct_message);
    AutoCompleteTextView autoCompleteTextView = (AutoCompleteTextView) getDialog().findViewById(R.id.editor_username);
    AbsoluteUrlHelper absoluteUrlHelper = new AbsoluteUrlHelper(hostname, new RealmServerInfoRepository(), new RealmUserRepository(hostname), new SessionInteractor(new RealmSessionRepository(hostname)));
    compositeDisposable.add(absoluteUrlHelper.getRocketChatAbsoluteUrl().subscribeOn(AndroidSchedulers.from(BackgroundLooper.get())).observeOn(AndroidSchedulers.mainThread()).subscribe(this::setupView, Logger::report));
    RxTextView.textChanges(autoCompleteTextView).map(text -> !TextUtils.isEmpty(text)).compose(bindToLifecycle()).subscribe(buttonAddDirectMessage::setEnabled, Logger::report);
    buttonAddDirectMessage.setOnClickListener(view -> createRoom());
}
Also used : SessionInteractor(chat.rocket.core.interactors.SessionInteractor) AbsoluteUrlHelper(chat.rocket.android.helper.AbsoluteUrlHelper) RealmSessionRepository(chat.rocket.persistence.realm.repositories.RealmSessionRepository) Logger(chat.rocket.android.helper.Logger) RxTextView(com.jakewharton.rxbinding2.widget.RxTextView) AutoCompleteTextView(android.widget.AutoCompleteTextView) TextView(android.widget.TextView) View(android.view.View) RealmServerInfoRepository(chat.rocket.persistence.realm.repositories.RealmServerInfoRepository) RealmUserRepository(chat.rocket.persistence.realm.repositories.RealmUserRepository) AutoCompleteTextView(android.widget.AutoCompleteTextView) SuppressLint(android.annotation.SuppressLint)

Aggregations

AutoCompleteTextView (android.widget.AutoCompleteTextView)106 View (android.view.View)62 TextView (android.widget.TextView)44 ArrayAdapter (android.widget.ArrayAdapter)38 Button (android.widget.Button)27 EditText (android.widget.EditText)21 OnClickListener (android.view.View.OnClickListener)20 KeyEvent (android.view.KeyEvent)19 AdapterView (android.widget.AdapterView)17 Intent (android.content.Intent)16 ImageView (android.widget.ImageView)14 Editable (android.text.Editable)10 TextWatcher (android.text.TextWatcher)10 ArrayList (java.util.ArrayList)9 Dialog (android.app.Dialog)8 ListView (android.widget.ListView)8 Spinner (android.widget.Spinner)8 DialogInterface (android.content.DialogInterface)7 InputMethodManager (android.view.inputmethod.InputMethodManager)7 SuppressLint (android.annotation.SuppressLint)6