简体   繁体   English

Android Coverflow起始位置

[英]Android Coverflow Starting Position

I am using https://github.com/Polidea/android-coverflow coverflow widget in my application. 我在我的应用程序中使用https://github.com/Polidea/android-coverflow Coverflow小部件。 The problem that I have is that I am unable to control the starting position of the widget . 我的问题是我无法控制小部件的开始位置。 I am astonished that no body has asked this , or ashamed that maybe they figured this one out themselves. 令我惊讶的是,没有人问过这个问题,或者感到they愧,也许他们自己想出了这个问题。

When I load a list of say 15 elements , the middle image on the screen is the 3rd. 当我说15个元素的列表时,屏幕上的中间图像是第3个。 If I swipe to left I will find 2 more , and the rest of them will be when seen when I swipe to the right. 如果我向左滑动,则会发现另外2个,其余的将在我向右滑动时看到。

I want the middle image to be the 7th element, so that right and left swipes reveal same number of items. 我希望中间图像成为第7个元素,以便左右滑动显示相同数量的项目。

Aid me please ? 请帮我吗?

您可以在CoverFlowExampleActivity中将coverFlow选择设置为0,如下所示:

coverFlow.setSelection(4, true);

您可以在CoverFlowExampleActivity中将coverFlow scrollToPosition设置为7,如下所示:

coverFlow.scrollToPosition(7);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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