如何在安卓中聚焦Recycler View的ViewHolder?

huangapple 未分类评论50阅读模式
英文:

How to focus viewHolder of recycler view in android?

问题

我希望当用户在RecyclerView中水平滚动时,RecyclerView的视图持有者会像下面的图片中的第一个RecyclerView那样稍微放大一点。谢谢!

英文:

I want when the user scrolls horizontally in the recycler view the view holder of recycler view zoom a little bit like this. Like the first recycler view of the below picture.Thanks!

<img src="https://raw.githubusercontent.com/jama5262/CarouselView/master/app/src/main/res/drawable/image3.gif">

答案1

得分: 0

这可以通过 Android 的 ViewPager2 轻松创建,按照这个教程操作,并使用 scale 效果对所选视图进行轻微缩放。这里是 Android 官方提供的 ViewPager2 示例项目,这也会对你有很大帮助。

英文:

This can be easily created by android ViewPager2 follow this tutorial and use scale effect to zoom your selected view a little bit. Here is android's official sample project of ViewPager2, this will help you much too.

huangapple
  • 本文由 发表于 2020年5月5日 07:27:18
  • 转载请务必保留本文链接:https://java.coder-hub.com/61603309.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定