简体   繁体   中英

How to show a overlay at a Recyclerview in Android? (see video)

How can I achieve the following result in Android?

Instead of trying to explain the behaviour in text, I think it's the easiest if I show you the behaviour, so I recorded a video of a prototype:

Video can be seen here: https://www.loom.com/share/a928378f4e9646f4946e9d837d792221

Note: The list of items is a RecyclerView

Actually it is very easy.

  1. All you can do is create a transparent view for the RecyclerView item in the Adapter.
  2. Pass variable in your model isClickable true or false Accordingly.
  3. Set transparent view's visibility and clicks according isClickable variable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM