Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. LayoutInflater inflater=LayoutInflater.from(this);
  2. View addView=inflater.inflate(R.layout.keyboardinput, null);
  3. EditText input = (EditText) addView.findViewById(R.id.KbdInput);
  4. input.setText(getIntent().getStringExtra("value"));
  5. new AlertDialog.Builder(this)
  6. .setTitle("Rockbox wants your input")
  7. .setView(addView)
  8. .setPositiveButton("OK",
  9. new DialogInterface.OnClickListener() {
  10. public void onClick(DialogInterface dialog,
  11. int whichButton) {
  12. //EditText input = (EditText) (Dialog)dialog.findViewById(R.id.KbdInput);
  13. //Editable s = input.getText();
  14. getIntent().putExtra("value", s.toString());
  15.  
  16. finish();
  17. }
  18. })
  19. .setNegativeButton("R.string.cancel",
  20. new DialogInterface.OnClickListener() {
  21. public void onClick(DialogInterface dialog,
  22. int whichButton) {
  23. // ignore, just dismiss
  24. }
  25. })
  26. .show();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement