Hey you are Calling showDialog(DIALOG_TEXT_ENTRY); from onCreate() method which display the Dialog immediately
when the Activity get started ,Than how can enter any thing in to the EditText ..
And one more thing mUserText.getText() will return Editable object not the String object
1. The two text fields don't exist in the original activity so they're being set to null. You need to find them in the view that you inflated, like this:
2. getText() is returning an Editable object. Usually you can use Editable wherever you use a String because they both implement CharSequence, but not in this case. Sorry I forgot to mention this earlier. The fix is to call toString() in the middle like this:
No i checked all the things it recognizes the click but it does not start a new activity.
I tried using Toast in the click event it goes upto that event but when i check for the equality it fails.
I made the changes above in my copy and it worked fine. Of course there's some bad recursion going on (an activity launching itself) but I assume that's just temporary code for demonstration.