TapTarget is placed behind RecyclerView items.
See original GitHub issueI’m trying to add a TapTarget in a RecyclerView item, but the TapTarget appears behind the item.
// Gets the first RecyclerView item
View view = UIUtils.getFirstVisibleItem(circlesView);
TapTarget tapTarget = TapTarget.forView(view, title, description);
new TapTargetSequence(activity).targets(tapTarget).start();
public class UIUtils {
public static View getFirstVisibleItem(RecyclerView recyclerView) {
View view = null;
RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
if(layoutManager instanceof LinearLayoutManager) {
int index = ((LinearLayoutManager) layoutManager).findFirstCompletelyVisibleItemPosition();
view = layoutManager.findViewByPosition(index);
}
return view;
}
}
If I increase the target radius, the appearance is a little better, but is not working as I expected. Look at the second screenshot.
- I have verified the issue exists on the latest version
- I am able to reproduce it
Version used: com.getkeepsafe.taptargetview:taptargetview:1.7.0
Stack trace: No stack trace
Android version: 6.0
Screenshots:
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
TapTargetView is placed behind popup menu - Stack Overflow
I created TapTargetView (or TapTargetSequence) in all of my activities and it displaying well, but for inner views of popup menu, it hides ......
Read more >Using the RecyclerView | CodePath Android Cliffnotes
Every adapter has three primary methods: onCreateViewHolder to inflate the item layout and create the holder, onBindViewHolder to set the view attributes based ......
Read more >Examples | Material Tap Target Prompt - GitHub Pages
A Tap Target implementation in Android based on Material Design Onboarding ... In the menu xml file the item will look something like...
Read more >Pagination Android Tutorial with RecyclerView: Getting Started
Android Tutorial on how to add Pagination (Endless scrolling or ... Loading the next set of data (next page), by specifying its index...
Read more >Customize your RecyclerView - Android Developers
Advanced customization options for RecyclerView. ... to activate an item by tapping it, or is attempting to drag and drop an item or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You want to use something like
instead of
getX
andgetY
since those methods are relative to the parent, not the screen.@xiphirx. Specifying a Rect is not working well. Look at the following screenshots. I draw a Rect in Canvas and I pass the same Rect to TapTarget. It should draw the circle where the rectangule is positioned. Any suggestion?