title: how to trigger UI update when alertdialog gets dismissed
body: <p>I have an AlertDialog which appears initiated by a BroadcastReceiver - so the AlertDialog may appear ontop of ANY of my activities without knowing which activityis actually under it.</p>
  
  <pre><code>private void showAlert(Context context, String s) {
  final AlertDialog alertDialog = new AlertDialog.Builder(context)
      .create();
  alertDialog.setTitle(context.getString(R.string.SMS_Alert_title));
  alertDialog.setMessage(s);
  alertDialog.setButton(context.getString(R.string.alert_OK),
      new AlertDialog.OnClickListener() {
          public void onClick(DialogInterface dialog, int which) {
          return; //can't call the underlying activity's ui update method bec I don't know which activity is actually underlying
          }
      });
  alertDialog.setIcon(R.drawable.icon);
  alertDialog.show();
  }
  </code></pre>
  
  <p>When I now press the "OK" button on the AlertDialog to dismiss it, the pressed status of all my buttons in the underlying activity become unpressed. I need them to remain pressed simply because my buttons show a different png during pressed status - which I also use to show that they are and remain "ON" when pressed. (I can't use toggle buttons in this case)</p>
  
  <p>Ideally I just need to update my UI of the underlying activity but <code>onResume</code> is NOT called when the AlertDialog gets dismissed.</p>
  
  <p>Also I cannot call any UI update method when pressing the ALertDialog OK button, since I do not know which activity is actually under the AlertDialog (as the ALertDialog may appear ontop of any activity)</p>
  
  <p>(I hope I could explain the problem well enough)</p>
  
  <p>ps While I could change the background of the unpressed buttons to the pressed png instead of just saying <code>btn.setPressed(true)</code> I would like to avoid it.</p>
  
  <p>Many thanks</p>