title: EditText.setText("") in Dialog keeps Crashing App
body: <p>I´ve stumbled across the following problem coding my app:</p>
  
  <p>Whenever the statement <code>Txtname.setText(name)</code> is not suppressed, the app keeps crashing. Even when I hardcode string in, there it crashes. Via the toast I was able to see that the string name is passed correctly.</p>
  
  <pre><code>    //OnListpress
      listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, int i, long l) {
              Log.d(TAG, "onItemClick: name:" + thelist.get(i));
              String name = thelist.get(i);
              Showpopup(name);
          }
  
          //PopUP
          private void Showpopup(final String name) {
              myDialog = new Dialog(getActivity());
              myDialog.setContentView(R.layout.popup_list);
              myDialog.show();
              EditText Txtname = getActivity().findViewById(R.id.TxtNAME);
  
              Txtname.setText(name);
              Toast.makeText(getActivity(),name,Toast.LENGTH_LONG).show();
          }
      });
  </code></pre>
  
  <p>I found a few topics regarding this problem, but they always used Fragments as basis for the edittext. Mine is a dialog and the presented ways don't seem to work for me.
  I hope somebody knows the fix, thanks in advance!</p>