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);
}
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);
}
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);
}
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);
}
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());
}
Aggregations