Skip to content

Commit

Permalink
v1.0.7: use mainLopper for the handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Fahim Salam Chowdhury committed Sep 27, 2022
1 parent 013a05b commit 19729a8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.os.Handler;
import android.os.Looper;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
Expand Down Expand Up @@ -125,7 +126,7 @@ public boolean isShowing() {

public void dismiss() {
if (dialog != null) {
new Handler().postDelayed(() -> {
new Handler(Looper.getMainLooper()).postDelayed(() -> {
try {
if (dialog != null)
dialog.dismiss();
Expand Down

0 comments on commit 19729a8

Please sign in to comment.