Android Cover Flow gallery and remove space betwee

2019-01-26 15:18发布

I want to implement cover flow view as shown below image. I also tried with cover flow but cant achieved perfect view as show in image. Reduce the space between the items. enter image description here

 this.fancyCoverFlow.setSpacing(-90); 

I tried with this line and its working but other problem occur as shown below image not getting same spec to left and right . And scroll from left to right working fine but scroll from right to left not in correct way.

enter image description here

Updated: Try with this code

5条回答
萌系小妹纸
2楼-- · 2019-01-26 16:14

if you implement gallery as use FancyCoverFlow, you can use this.fancyCoverFlow.setSpacing(-90); -90 may be modify

查看更多
孤傲高冷的网名
3楼-- · 2019-01-26 16:15

I am also faced same problem, use following code in your code (FancyCoverFlow.java) file.

private void initialize()  {
this.transformationCamera = new Camera();
this.setSpacing(-200); // specifies space between images. }

In my case I am using FancyCoverFlow which extends Gallery.

查看更多
时光不老,我们不散
4楼-- · 2019-01-26 16:16

Use

this.fancyCoverFlow.setUnselectedAlpha(1.0f);
this.fancyCoverFlow.setActionDistance(FancyCoverFlow.ACTION_DISTANCE_AUTO);
this.fancyCoverFlow.setUnselectedScale(0.75f);

in your code, i hope this will help you.

查看更多
放我归山
5楼-- · 2019-01-26 16:17

https://github.com/davidschreiber/FancyCoverFlow

This should be of help for what you are trying to achieve.

查看更多
狗以群分
6楼-- · 2019-01-26 16:18
登录 后发表回答