I had to achieve the same effect a long time ago, and I used this WheelView at that time.
WheelView
There is an attribute itemVisibleNum which meets the requirement.
itemVisibleNum