-3

I want to call data of activity using popup. Let me explain in brief... when i click on EditText of a dialog box Dailogbox

when i click on EditText (Template) then it will open activity. Activity, when i click on EditText(Template)

after i select one option and activity will finish and selected option's value will be set in EditText of Template.

1 Answers1

0

Why not use a Button (perhaps with a drawable) instead of an EditText? This makes more sense because the user won't be typing anything into the EditText.

As for passing the data back and forth, just use startActivityForResult().

Before choosing template

After choosing template

Gavin Wright
  • 3,124
  • 3
  • 14
  • 35
  • it's working in activity but it's not working in AlertDialog case. – Arpit Singh Sep 01 '20 at 13:21
  • You could [use an AlertDialog.Builder](https://medium.com/@suragch/creating-a-custom-alertdialog-bae919d2efa5) and put it right in your Activity code. Then `startActivityforResult()` would work find because you're still in the Activity. – Gavin Wright Sep 01 '20 at 13:29