5

I need to create a RecyclerView with multiple ViewTypes. However, on some of the items, I need to display a Tooltip which should hover over the above row.

My requirement is: enter image description here

In the above image, there are 4 items in the RecyclerView, and the tooltip in the lower row should overlap on top of the above row (or rows, as required). This tooltip would only be visible in some scenarios - when the lock icon is visible.

The problem is, if I add this tooltip as a TextView to the row_layout.xml, and control it's visibility programmatically, it increases the height of that row and does not overlap onto the above layout.

How can I get this view to "hover" over the above rows without displacing them?

If you require code, I can edit this question and post the code too (but I think it might not be necessary here).

Community
  • 1
  • 1
Rachit
  • 3,173
  • 3
  • 28
  • 45

3 Answers3

3

You can make use of Android Tooltips library.

Simple to use customizable Android Tooltips library based on PopupWindow. This Tooltips does not require any custom layout. It works as PopupWindow.

dependencies {
    compile 'com.github.vihtarb:tooltip:0.1.9'
}

usage:

Tooltip tooltip = new Tooltip.Builder(anchorView)
    .setText("Hello tooltip")
    .show();
Gopal
  • 1,734
  • 1
  • 14
  • 34
0

Dont know if it will work for recycler view ,but for list view you can use quick action item, complete article is over here also look at these Libraries some of them may work for recyclerview

Community
  • 1
  • 1
Manohar
  • 22,116
  • 9
  • 108
  • 144
0

You could use this library Super Tooltips

It is simple to use and powerful.