Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.57 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Dialog does not show() the 2nd time immediately after hide() / dismiss()
  2. public void onResume(){
  3.   super.onResume();
  4.   ...
  5.   // initialize the dialog
  6.   mWaitingDialog = new WaitingDialog(getActivity());
  7.   ...
  8. }
  9.        
  10. public class WaitingDialog extends ProgressDialog {
  11.  
  12.     public WaitingDialog(Context context) {
  13.         super(context);
  14.         setMessage(context.getText(R.string.searching));
  15.         setIndeterminate(true);
  16.         setCancelable(true);
  17.     }
  18. }
  19.        
  20. mWaitingDialog.hide();
  21.        
  22. private void performGeolocationRequest(EditText v) {
  23.   mWaitingDialog.show();
  24.   ...
  25. }