Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LayoutInflater inflater=LayoutInflater.from(this);
- View addView=inflater.inflate(R.layout.keyboardinput, null);
- EditText input = (EditText) addView.findViewById(R.id.KbdInput);
- input.setText(getIntent().getStringExtra("value"));
- new AlertDialog.Builder(this)
- .setTitle("Rockbox wants your input")
- .setView(addView)
- .setPositiveButton("OK",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog,
- int whichButton) {
- //EditText input = (EditText) (Dialog)dialog.findViewById(R.id.KbdInput);
- //Editable s = input.getText();
- getIntent().putExtra("value", s.toString());
- finish();
- }
- })
- .setNegativeButton("R.string.cancel",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog,
- int whichButton) {
- // ignore, just dismiss
- }
- })
- .show();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement