Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The App freezes while explaining UI in recyclerView #341

Open
Pro-55 opened this issue Mar 7, 2019 · 3 comments
Open

The App freezes while explaining UI in recyclerView #341

Pro-55 opened this issue Mar 7, 2019 · 3 comments

Comments

@Pro-55
Copy link

Pro-55 commented Mar 7, 2019

  • [✓] I have verified the issue exists on the latest version
  • [✓] I am able to reproduce it

Version used: 1.12.0

Android version: 8.0 & above

The App seems to freeze if we are trying to explain UI in recyclerView. It kinda resumes when we turn off the screen and turn it back on.

Below is the method I call when I have to show the popUps:
private void explainNearbyCard(View topView, ArrayList<String> targetTitleList, ArrayList<String> targetDescriptionList) { new TapTargetSequence(getActivity()) .targets(TapTarget.forView(topView.findViewById(R.id.ivClickToMenu), targetTitleList.get(0), targetDescriptionList.get(0)) .titleTextColor(R.color.white) .titleTextSize(35) .descriptionTextColor(R.color.white) .descriptionTextSize(20) .descriptionTextAlpha(1.0f) .targetRadius(45) .tintTarget(false) .outerCircleAlpha(0.8f) .outerCircleColor(R.color.spotlight_share_blue), TapTarget.forView(topView.findViewById(R.id.ivLike), targetTitleList.get(1), targetDescriptionList.get(1)) .titleTextColor(R.color.white) .titleTextSize(35) .descriptionTextColor(R.color.white) .descriptionTextSize(20) .descriptionTextAlpha(1.0f) .targetRadius(45) .tintTarget(false) .outerCircleAlpha(0.8f) .outerCircleColor(R.color.spotlight_share_blue)) .considerOuterCircleCanceled(true) .continueOnCancel(true) .listener(new TapTargetSequence.Listener() { @Override public void onSequenceFinish() { Preferences.setNearbyCardLikeExplained(getApplicationContext(), false); } @Override public void onSequenceStep(TapTarget lastTarget, boolean targetClicked) { Preferences.setNearbyCardOptionsExplained(getApplicationContext(), false); } @Override public void onSequenceCanceled(TapTarget lastTarget) { } }) .start(); }

@Pro-55
Copy link
Author

Pro-55 commented Mar 12, 2019

This happens when I try to execute same method over and over again.

@technicalflaw
Copy link

technicalflaw commented Jan 4, 2020

ViewTapTarget#onReady() waits for the item to be laid out using View#isLaidOut(), which will never get called after the first layout when it is part of a RecyclerView item.

Either create a custom TapTarget subclass to fix it, or, if you can, map the view to its bounds, and use TapTarget.fromBounds()

(#365 is probably related to this)

@numerative
Copy link

numerative commented Jan 27, 2020

@technicalflaw can you please elaborate a bit more for beginners as to how the subclass can fix it..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants