RecyclerCoverFlow icon indicating copy to clipboard operation
RecyclerCoverFlow copied to clipboard

使用RecyclerView,自定义LayoutManager实现旋转木马相册效果

Results 22 RecyclerCoverFlow issues
Sort by recently updated
recently updated
newest added

CoverFlowLayoutManger中mSlectPositon计算存在bug private void onSelectedCallBack() { mSelectPosition = Math.round (mOffsetAll / getIntervalDistance()); mSelectPosition = Math.abs(mSelectPosition % getItemCount()); if (mSelectedListener != null && mSelectPosition != mLastSelectPosition) { mSelectedListener.onItemSelected(mSelectPosition); } mLastSelectPosition = mSelectPosition;...

https://github.com/ChenLittlePing/RecyclerCoverFlow/commit/e63ac141e55f2b0188766af41dfaaf291adfeedf#r46772916

Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'boolean androidx.recyclerview.widget.RecyclerView$State.isPreLayout()' on a null object reference recycler.coverflow.CoverFlowLayoutManger.layoutItems (CoverFlowLayoutManger.java:184) recycler.coverflow.CoverFlowLayoutManger.access$300 (CoverFlowLayoutManger.java:28) recycler.coverflow.CoverFlowLayoutManger$1.onAnimationUpdate (CoverFlowLayoutManger.java:448) android.animation.ValueAnimator.animateValue (ValueAnimator.java:1558) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:950)

how to make indicator with the recycle cover flow? i'm tried to add to LinePagerIndicatorDecoration when using addItemDecoration, after casting the layout with CoverFlowLayoutManger, i have a problem when findFirstVisibleItemPosition...

你好,我用的平板横屏调试demo,出现这个问题。 我debug看了下, 位置0->位置1,正常调用smoothScrollToPosition 位置1->位置2,调用smoothScrollToPosition同时会调用scrollHorizontallyBy,导致mOffsetAll重新计算,导致滚动失败。 我尝试着在scrollHorizontallyBy 和 fixOffsetWhenFinishScroll方法里加个判断,return出去不触发,恢复正常使用。具体原因分析不出来。 我的修改: ` @Override public int scrollHorizontallyBy(int dx, RecyclerView.Recycler recycler, RecyclerView.State state) { if (isSmoothScroll){ Log.e("isSmoothScroll" , "return"); return 0; } if (mAnimation !=...

开启平面滚动,view的回收复用不协调

最中间的最大那个item与左右两个的比例

需求: 在屏幕上只想显示五个item. 解决方案: 根据自身item的宽和设置item间隔因数,来调整显示在屏幕上面的个数. 设定好只显示五个item. 但是由于屏幕的像素密度不一致的问题. 会导致部分手机上显示不同, 可能会显示七个或是更多. 例如乐视 Le x260手机 1dp = 2.625px. 它比其它手机可能会多显示两个或是更多. 推荐使用张鸿洋的AndroidAutoLayout库. https://github.com/hongyangAndroid/AndroidAutoLayout 对它的item进行尺寸适配, 所有屏幕基上就长的一样了, 这样下来就可以完美解决了

故障复现: 1)将item间隔因数设置为0.62f, 同时将RecyclerCoverFlow高度设置为140dp,宽度充满. adapteer的item宽高设置为120dp. 这样刚好让屏幕上只显示5个item. 2)故障规律:在滑动RecyclerCoverFlow停止后,如果停止item position正好是5的倍数余1.(是以Demo中position从1开始计算) bug就会复现. 例如每屏item数量为5个, Demo滑动停止后的item position为6, 11 ,16, 21,31,36等等, 最中间的item都会被右边的item (第7,12 , 17, 22, 32,37)所盖住一部分,也就是最中间的item层级不是在最上层. 补充: 将间隔因数设置为0.6f,就不会复现这种问题