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