title: EditText in dialog returning null string
body: <p>I have this <code>button</code> to show a <code>dialog</code> which in turn has an <code>EditText</code> for the users to write something and then tap the <code>done</code> button to save it otherwise another <code>button</code> to close the <code>dialog</code>. The problem here is that I am not able to fetch that <code>String</code> that the user wrote. It returns me a null sting instead and causes the app to crash. Here's the code :</p>
  
  <p>I call the <code>dialog</code> up on clicking on a button:</p>
  
  <pre><code>        //Write Review Dialog Box
  
      writeReviewBtn.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Log.i("HAPPENED", "This Onclick is working");
              try{
  
                  // Create custom dialog object                    
                  final Dialog dialog = new Dialog(GetReviewActivity.this);
                  // Include dialog's xml file                    
                  dialog.setContentView(R.layout.write_review_activity);
                  // Set dialog title                    
                  dialog.setTitle("Your review is valuable");
  
                  final EditText etWR = (EditText)findViewById(R.id.etWR);
  
                  Button writeButton = (Button) dialog.findViewById(R.id.buttonWR);
  
                  Button declineButton = (Button) dialog.findViewById(R.id.buttonNoThanks);
  
                  dialog.show();
  
                  //Done Button
                  writeButton.setOnClickListener(new View.OnClickListener() {
                      @Override
                      public void onClick(View v) {
                          Log.i("HAPPENED: ","writeButton Block Is WORKING!");
                           Activity activity = GetReviewActivity.this;
                          activity.runOnUiThread(new Runnable() {
                              @Override
                              public void run() {
                                  String Review = etWR.getText().toString();
                                  StoreAReview(Review);
                              }
                          });
                      }
                  });
  
                  // if decline button is clicked, close the custom dialog
                  declineButton.setOnClickListener(new View.OnClickListener() {
                      @Override
                      public void onClick(View v) {
                          // Close dialog
                          dialog.dismiss();
                      }
                  });
  
              }catch (Exception e){
                  e.printStackTrace();
              }
          }
      });
  </code></pre>