Search in sources :

Example 16 with EditText

use of android.widget.EditText in project AsmackService by rtreffer.

the class AuthenticatorActivity method handleLogin.

/**
     * Handle a login attempt by starting the login thread and showing a wait
     * dialog.
     * @param view The base view, ignored.
     */
public void handleLogin(View view) {
    showDialog(0);
    EditText usernameEdit = (EditText) findViewById(R.id.username_edit);
    EditText passwordEdit = (EditText) findViewById(R.id.password_edit);
    String username = usernameEdit.getText().toString();
    String password = passwordEdit.getText().toString();
    loginTestThread = new LoginTestThread(username, password, handler, this);
    loginTestThread.start();
}
Also used : EditText(android.widget.EditText) LoginTestThread(com.googlecode.asmack.sync.LoginTestThread)

Example 17 with EditText

use of android.widget.EditText in project simplefacebook by androidquery.

the class SettingsActivity method share.

///PROFILE_ID/links 	Publish a link on the given profile 	link, message, picture, name, caption, description
private void share() {
    String message = getString(R.string.share_app_message);
    String title = getString(R.string.share) + " @Facebook";
    DialogUtility.askYesNo(this, title, message, new OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            AlertDialog d = (AlertDialog) dialog;
            EditText edit = (EditText) d.findViewById(R.id.input);
            String message = edit.getEditableText().toString().trim();
            AQUtility.debug("send message", message);
            if (message.length() > 0) {
                shareSend(message);
            }
        }
    });
}
Also used : AlertDialog(android.app.AlertDialog) EditText(android.widget.EditText) DialogInterface(android.content.DialogInterface) OnClickListener(android.content.DialogInterface.OnClickListener)

Example 18 with EditText

use of android.widget.EditText in project platform_frameworks_base by android.

the class ManyEditTextActivityScrollResize method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mRootView = new ScrollView(this);
    LinearLayout layout = new LinearLayout(this);
    layout.setOrientation(LinearLayout.VERTICAL);
    for (int i = 0; i < NUM_EDIT_TEXTS; i++) {
        final EditText editText = new EditText(this);
        editText.setText(String.valueOf(i));
        editText.setId(i);
        layout.addView(editText);
    }
    ((ScrollView) mRootView).addView(layout);
    setContentView(mRootView);
    this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
}
Also used : EditText(android.widget.EditText) ScrollView(android.widget.ScrollView) LinearLayout(android.widget.LinearLayout)

Example 19 with EditText

use of android.widget.EditText in project platform_frameworks_base by android.

the class OneEditTextActivitySelected method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    LinearLayout layout = new LinearLayout(this);
    layout.setOrientation(LinearLayout.VERTICAL);
    mRootView = new ScrollView(this);
    EditText editText = new EditText(this);
    editText.requestFocus();
    mDefaultFocusedView = editText;
    layout.addView(editText);
    ((ScrollView) mRootView).addView(layout);
    setContentView(mRootView);
    // set to resize so IME is always shown (and also so
    // ImfBaseTestCase#destructiveCheckImeInitialState thinks it should always be shown
    this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
}
Also used : EditText(android.widget.EditText) ScrollView(android.widget.ScrollView) LinearLayout(android.widget.LinearLayout)

Example 20 with EditText

use of android.widget.EditText in project platform_packages_apps_launcher by android.

the class Launcher method onPrepareDialog.

@Override
protected void onPrepareDialog(int id, Dialog dialog) {
    switch(id) {
        case DIALOG_CREATE_SHORTCUT:
            break;
        case DIALOG_RENAME_FOLDER:
            if (mFolderInfo != null) {
                EditText input = (EditText) dialog.findViewById(R.id.folder_name);
                final CharSequence text = mFolderInfo.title;
                input.setText(text);
                input.setSelection(0, text.length());
            }
            break;
    }
}
Also used : EditText(android.widget.EditText)

Aggregations

EditText (android.widget.EditText)655 View (android.view.View)309 TextView (android.widget.TextView)220 DialogInterface (android.content.DialogInterface)143 AlertDialog (android.app.AlertDialog)126 Button (android.widget.Button)126 Intent (android.content.Intent)99 LinearLayout (android.widget.LinearLayout)79 ImageView (android.widget.ImageView)61 AlertDialog (android.support.v7.app.AlertDialog)54 ScrollView (android.widget.ScrollView)52 LayoutInflater (android.view.LayoutInflater)48 AdapterView (android.widget.AdapterView)46 ViewGroup (android.view.ViewGroup)42 Editable (android.text.Editable)41 Context (android.content.Context)40 RecyclerView (android.support.v7.widget.RecyclerView)40 ListView (android.widget.ListView)39 Dialog (android.app.Dialog)36 Bundle (android.os.Bundle)36