All Projects → CCY0122 → Focuslayoutmanager

CCY0122 / Focuslayoutmanager

Licence: apache-2.0
有焦点item的水平/垂直滚动RecyclerView-LayoutManager。仿Android豆瓣书影音“推荐“频道列表布局

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Focuslayoutmanager

epg magic carousel
Awesome RecyclerView with custom LayoutManager
Stars: ✭ 98 (-87.31%)
Mutual labels:  recyclerview, layoutmanager
Chipslayoutmanager
ANDROID. ChipsLayoutManager (SpanLayoutManager, FlowLayoutManager). A custom layout manager for RecyclerView which mimicric TextView span behaviour, flow layouts behaviour with support of amazing recyclerView features
Stars: ✭ 3,138 (+306.48%)
Mutual labels:  layoutmanager, recyclerview
InfiniteScrollRecyclerView
Enables the RecyclerView to Auto scroll for indefinite time.
Stars: ✭ 49 (-93.65%)
Mutual labels:  recyclerview, layoutmanager
Cardstackview
📱Tinder like swipeable card view for Android
Stars: ✭ 1,850 (+139.64%)
Mutual labels:  layoutmanager, recyclerview
Spannedgridlayoutmanager
Android RecyclerView.LayoutManager that resizes and reorders views based on SpanSize
Stars: ✭ 492 (-36.27%)
Mutual labels:  layoutmanager, recyclerview
RollingLayoutManager
vrgsoft.net
Stars: ✭ 57 (-92.62%)
Mutual labels:  recyclerview, layoutmanager
SpannedGridLayoutManager
Android RecyclerView.LayoutManager that resizes and reorders views based on SpanSize
Stars: ✭ 522 (-32.38%)
Mutual labels:  recyclerview, layoutmanager
Reel Search Android
Reel Search for Android is a UI/UX design for autocomplete action. It is a beautiful minimalistic addition to any use case.
Stars: ✭ 110 (-85.75%)
Mutual labels:  layoutmanager, recyclerview
Stackcardlayoutmanager
Stars: ✭ 376 (-51.3%)
Mutual labels:  layoutmanager, recyclerview
Stacklayoutmanager
customized layoutmanager,let item pile up like stackview/类似最美有物卡片堆叠效果
Stars: ✭ 343 (-55.57%)
Mutual labels:  layoutmanager, recyclerview
Discretescrollview
A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.
Stars: ✭ 5,533 (+616.71%)
Mutual labels:  layoutmanager, recyclerview
Gallerylayoutmanager
New way to implements ViewPager/Gallery in Android with RecycleView
Stars: ✭ 684 (-11.4%)
Mutual labels:  layoutmanager, recyclerview
Carouselrecyclerview
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.
Stars: ✭ 107 (-86.14%)
Mutual labels:  layoutmanager, recyclerview
CardLayoutManager
A custom layoutManager providing a Tinder-like cards effect.
Stars: ✭ 37 (-95.21%)
Mutual labels:  recyclerview, layoutmanager
Jkcardlayout
高仿即刻APP探索页卡片布局拖拽、卡片前进、回退和下拉效果,采用RecyclerView和自定义LayoutManager实现
Stars: ✭ 111 (-85.62%)
Mutual labels:  layoutmanager, recyclerview
SlideView
🔖 Card RecycleViewManager, to make your interface cool.Use recyclerView to add cool effects to the view.
Stars: ✭ 16 (-97.93%)
Mutual labels:  recyclerview, layoutmanager
Turn Layout Manager
A carousel layout manager for RecyclerView
Stars: ✭ 946 (+22.54%)
Mutual labels:  layoutmanager, recyclerview
Cardswipelayout
Use RecyclerView to achieve card swipe layout , like Tantan . (模仿探探卡片滑动效果的布局)
Stars: ✭ 1,081 (+40.03%)
Mutual labels:  layoutmanager, recyclerview
Horizontalpicker
A simple, customizable and easy to use picker where centre view is scaled up
Stars: ✭ 337 (-56.35%)
Mutual labels:  layoutmanager, recyclerview
Awesome Recyclerview Layoutmanager
RecyclerView-LayoutManager Resources
Stars: ✭ 581 (-24.74%)
Mutual labels:  layoutmanager, recyclerview

Download

FocusLayoutManager

有焦点item的水平/垂直滚动RecyclerView-LayoutManager。仿Android豆瓣书影音“推荐“频道列表布局

效果


截图:


GIF:
gif1 gif2


可自己监听滚动编写效果,如修改成仿MacOS文件浏览:

依赖

implementation 'com.ccy:FocusLayoutManager:1.0.2'
// (or api)

使用

 focusLayoutManager =
                new FocusLayoutManager.Builder()
                        .layerPadding(dp2px(this, 14))
                        .normalViewGap(dp2px(this, 14))
                        .focusOrientation(FocusLayoutManager.FOCUS_LEFT)
                        .isAutoSelect(true)
                        .maxLayerCount(3)
                        .setOnFocusChangeListener(new FocusLayoutManager.OnFocusChangeListener() {
                            @Override
                            public void onFocusChanged(int focusdPosition, int lastFocusdPosition) {
                                
                            }
                        })
                        .build();
recyclerView.setLayoutManager(focusLayoutManager);

各属性意义见图:

注意:因为item在不同区域随着滑动会有不同的缩放(受动画控制),所以实际视觉上堆叠view的间距、普通view的间距未必等于layerPadding、normalViewGap

调整动画效果:

                new FocusLayoutManager.Builder()
                        ......
                        .setSimpleTrasitionListener(new FocusLayoutManager.SimpleTrasitionListener() {
                             @Override
                            public float getLayerViewMaxAlpha(int maxLayerCount) {
                                return super.getLayerViewMaxAlpha(maxLayerCount);
                            }

                            @Override
                            public float getLayerViewMinAlpha(int maxLayerCount) {
                                return super.getLayerViewMinAlpha(maxLayerCount);
                            }

                            @Override
                            public float getLayerChangeRangePercent() {
                                return super.getLayerChangeRangePercent();
                            }
                            //and more
                            
                            //更多可重写方法和释义见接口声明
                        })
                        .build();

自定义动画/滚动监听:

如果你想在滑动时不仅仅改变item的大小、透明度,你有更多的想法,可以监听TrasitionListener,该监听暴露了很多关键布局数据,

            ......
            .setSimpleTrasitionListener(null) //如果默认动画不想要,移除之。or use removeTrasitionlistener(XXX) 
            .addTrasitionListener(new FocusLayoutManager.TrasitionListener() {
                            @Override
                            public void handleLayerView(FocusLayoutManager focusLayoutManager,
                                                        View view, int viewLayer,
                                                        int maxLayerCount, int position,
                                                        float fraction, float offset) {
                                
                            }

                            @Override
                            public void handleFocusingView(FocusLayoutManager focusLayoutManager,
                                                           View view, int position,
                                                           float fraction, float offset) {

                            }

                            @Override
                            public void handleNormalView(FocusLayoutManager focusLayoutManager, View view, int position, float fraction, float offset) {

                            }
                        })

各参数意义见接口注释。 实际上SimpleTrasitionListener内部就会被转为TrasitionListener。可参考转换类是怎么做的:TrasitionListenerConvert

源码解析

https://blog.csdn.net/ccy0122/article/details/90515386

阿里内推(长期)

可帮阿里内推。将想投的阿里招聘官网职位链接+简历简介+备注“github#1”(用于让我知道你是在哪里看到我的)发我邮箱[email protected]

tips:

简历绝对真实,背调阶段查出诚信问题会被阿里拉黑。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].