Skip to content

Instantly share code, notes, and snippets.

@nesterchung
Last active June 1, 2017 08:58
Show Gist options
  • Save nesterchung/fa96c3ec596c3eb9459e5d003a14a5bd to your computer and use it in GitHub Desktop.
Save nesterchung/fa96c3ec596c3eb9459e5d003a14a5bd to your computer and use it in GitHub Desktop.
Reproduce attached to window manager
package com.example.nester.crachreproduce;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
public class NoAttachActivity extends AppCompatActivity {
private ProgressDialog progressDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
progressDialog = new ProgressDialog(this);
progressDialog.show();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
progressDialog.dismiss();
}
}, 1000);
finish();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment