ShowCaseView icon indicating copy to clipboard operation
ShowCaseView copied to clipboard

ShowCaseView is behind Dialog

Open newarifrh opened this issue 5 years ago • 4 comments

Hi, this is really a nice library. but I think there is no best way to use this library for Dialog. Because when I managed to display the showcase for the dialog, the showcase was behind it, causing me to leave the showcase, I must leave the dialog first.

I have tried using bringToFront() for the showcase but the showcase remains behind the dialog.

image

image

My Dialog

AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setTitle("NO Induk");
builder.setCancelable(false);

LayoutInflater inflater = getActivity().getLayoutInflater();
final View view = inflater.inflate(R.layout.layout_pinjam, null);

final EditText etSearch = view.findViewById(R.id.etSearch);
final RelativeLayout btnSearch = view.findViewById(R.id.search);
final ImageView qrBuku = view.findViewById(R.id.qrBuku);
final ImageView close = view.findViewById(R.id.close);

builder.setView(view);

final AlertDialog alertDialog = builder.create();
alertDialog.setCanceledOnTouchOutside(false);
alertDialog.show();

My ShowCaseView

GuideView.Builder builder = new GuideView.Builder(getContext())
  		.setTitle("Isian Peminjaman Buku")
  		.setContentText("Untuk meminjam buku masukan no induk atau scan barcode buku")
  		.setTargetView(view.findViewById(R.id.close))
  		.setContentTextSize(12)
  		.setTitleTextSize(14)
  		.setDismissType(DismissType.targetView);

GuideView guideView = builder.build();
guideView.show();
guideView.bringToFront();

newarifrh avatar May 18 '19 11:05 newarifrh

Hi, this is really a nice library. but I think there is no best way to use this library for Dialog. Because when I managed to display the showcase for the dialog, the showcase was behind it, causing me to leave the showcase, I must leave the dialog first.

I have tried using bringToFront () for the showcase but the showcase remains behind the dialog.

image

image

My Dialog AlertDialog.Builder q3 = new AlertDialog.Builder(getContext()); q3.setTitle("NO Induk"); q3.setCancelable(false); LayoutInflater inflater = getActivity().getLayoutInflater(); final View view1 = inflater.inflate(R.layout.layout_pinjam, null); final EditText etSearch = view1.findViewById(R.id.etSearch); final RelativeLayout btnSearch = view1.findViewById(R.id.search); final ImageView qrBuku = view1.findViewById(R.id.qrBuku); final ImageView close = view1.findViewById(R.id.close); q3.setView(view1); final AlertDialog q3Dialog = q3.create(); q3Dialog.setCanceledOnTouchOutside(false); q3Dialog.show();

My ShowCaseView GuideView.Builder ok = new GuideView.Builder(getContext()) .setTitle("Isian Peminjaman Buku") .setContentText("Untuk meminjam buku masukan no induk atau scan barcode buku") .setTargetView(view1.findViewById(R.id.close)) .setContentTextSize(12) .setTitleTextSize(14) .setDismissType(DismissType.targetView); GuideView ja = ok.build(); ja.show(); ja.bringToFront();

did u get your solution ? can u share ?

ahmadbashir1612 avatar Dec 13 '20 09:12 ahmadbashir1612

Same issue here.

sergiotucano avatar Dec 21 '20 16:12 sergiotucano

Same issue 😢

Damercy avatar May 14 '21 12:05 Damercy

Smth like this helped me https://stackoverflow.com/questions/23896656/showcaseview-on-top-of-dialogfragment

andrewbarabash avatar Nov 17 '21 09:11 andrewbarabash