We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94f3b6e commit 4ae16efCopy full SHA for 4ae16ef
app/src/main/java/fr/free/nrw/commons/utils/DialogUtil.java
@@ -5,6 +5,7 @@
5
import android.app.Dialog;
6
import android.content.DialogInterface;
7
import android.view.View;
8
+import android.view.ViewGroup;
9
10
import org.apache.commons.lang3.StringUtils;
11
@@ -116,6 +117,8 @@ private static void showAlertDialog(Activity activity,
116
117
final Runnable onNegativeBtnClick,
118
View customView,
119
boolean cancelable) {
120
+ if (customView != null && customView.getParent() != null)
121
+ ((ViewGroup) customView.getParent()).removeAllViews();
122
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
123
builder.setTitle(title);
124
builder.setMessage(message);
0 commit comments