Why is my showcaseview showing behind my bottomsheetdialog in android?

107 views Asked by At

I am trying to show a showcase inside my bottomsheetdialog, as shown in my code below:

MainActivity.java:

report.setOnClickListener(v -> {
    final Dialog dialog = new Dialog(MainActivity.this);
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setContentView(R.layout.bottom_dialog_layout);

    EditText report_bill_type = dialog.findViewById(R.id.bll);
    dialog.show();
    dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT,
                                 ViewGroup.LayoutParams.WRAP_CONTENT);
    dialog.getWindow().setBackgroundDrawable(new ColorDrawable((Color.TRANSPARENT)));
    dialog.getWindow().setGravity(Gravity.BOTTOM);

    new GuideView.Builder(v.getContext())
        .setTitle("Title here")
        .setContentText("Description here")
        .setGravity(smartdevelop.ir.eram.showcaseviewlib.config.Gravity.auto)
        .setTargetView(report_bill_type) //showcase keeps showing behind the dialog
        .setDismissType(DismissType.anywhere)
        .build()
        .show();
});

When I execute the code, the showcase keeps showing behind the dialog. How do I resolve this issue?

I am using this showcase view.

0

There are 0 answers