xmusistone / vegalayoutmanager Goto Github PK
View Code? Open in Web Editor NEW√A customized LayoutManager - fade and shrink the head itemView when scrolling.
√A customized LayoutManager - fade and shrink the head itemView when scrolling.
How I can get findLastVisibleItemPosition like in LinearLayoutManager for making pagination ?
i am using VegaLayoutManager , but screen is blank(nothing showing) !
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.main_recycler_view);
recyclerView.setLayoutManager(new VegaLayoutManager());
adapter = getAdapter();
recyclerView.setAdapter(adapter);
not working for me ! any idea how to fix it?
E/RecyclerView: You must override smoothScrollToPosition to support smooth scrolling
设置了viewpager的高度和id之后,前几个viewpager可以正常显示,滑动后下方的viewpager不显示,点击不显示的viewpager之后又正常显示了。
Hello,When I use the VegaLayoutManager, The notifyDataSetChanged is useless, And it need i scroll the recyclerview,then it can notify.
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); 有效果recyclerView.setLayoutManager(new VegaLayoutManager());不显示
i need a solution for the snap helper , right now it scrolls and snaps to the position , but i want it like viewpager snaping to the next position even i fling it
something like Paging your RecyclerView
When we attach it a card with different height then its causing view scaling issue. View are cropped.
希望上传到jcenter上 很不错的效果哦
changing visibility of specific View (view inside viewItem ) at some position than view height does not change. its height stays same.
I have tested VegaLayoutManager in Kitkat and above . There is a behavior difference .
On kitkat - On scroll to bottom, the last items scrolls to the top .
Above Kitkat - The last item remains on the bottom of recycler view .
Is this the issue with RecyclerView in Kitkat or some other ?
希望早日看到1.0版本,能用gradle直接引用
,使用recycler_view.smoothScrollToPosition(0) 出现以下错误如何解决。
You must override smoothScrollToPosition to support smooth scrolling
Thanks for this library.
I want to use the same animation as the library have but I just need to remove code which is for auto scroll when the first position hide. I need behavior same like the normal recycled view. can you please guild me how can I stop auto-scroll when move position?
Thanks
After scrolling and keep screen visible without touching after 2-3 min it hides recycler view items. and error is
E/RecyclerView: You must override onLayoutChildren(Recycler recycler, State state)
when u touch again it shows recyclerview items API23 device i m using.
If you want to check in android application this is link -
https://play.google.com/store/apps/details?id=io.app.cryptocoins
pls check (select currency)
VegaLayoutManager: line:284
@OverRide
public void onAttachedToWindow(RecyclerView view) {
super.onAttachedToWindow(view);
StartSnapHelper snapHelper = new StartSnapHelper();
view.setOnFlingListener(null);
snapHelper.attachToRecyclerView(view);
}
recyclerView.setOnFlingListener(null);
Hello, thanks for this spectacular library.
I have a problem with my RecyclerView: the linear layout manager works fine but as soon as I try yours, I have this problem (Photos: https://photos.app.goo.gl/KB84ASKxTwdrZkVH2 )
Is there a way to fix it?
As you can see, there is A LOT of space between some items and the last doesn't have the little textview in the bottom of the card.
Thanks
gradle引入:compile 'com.stone.vega.library:VegaLayoutManager:1.0.6'
报错信息为:
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.stone.vega.library:VegaLayoutManager:1.0.6.
Open File
Show Details
Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.stone.vega.library:VegaLayoutManager:1.0.6.
Open File
Show Details
provide way to calculate findFirstVisibleItemPosition using VegaLayoutManager.
应该在computeMaxScroll()方法中,当得到最低部item.bottom-getHeight()的值maxScroll是否小于0,如果小于0就直接return掉,这样子就不允许滑动了。望采纳
how can i set StackFromEnd?
本来想看源码学习的,看着好多代码,累了,就想着自己弄,
看了看效果,感觉就是线性的,唯一的区别就是第一个item有个变化而已。
代码如下,继承LinearLayoutManager重写如下的方法即可,基本可以达到效果,好像有人想要横向的,逻辑也差不多。
` var oldChild0:View?=null;
override fun scrollVerticallyBy(dy: Int, recycler: RecyclerView.Recycler, state: RecyclerView.State?): Int {
val result=super.scrollVerticallyBy(dy, recycler, state)
if(childCount>1){
val child1=getChildAt(1)
val child0=getChildAt(0)
if(oldChild0!=null&&oldChild0!=child0){
resetChild(oldChild0!!)
}
oldChild0=child0
var scale=0.7f+0.3f*(child1.top)/getDecoratedMeasuredHeight(child1)
child0.pivotX=child0.width/2f
child0.pivotY=child0.height/1f
child0.scaleX=scale
child0.scaleY=scale
child0.translationY=getDecoratedMeasuredHeight(child1)-child1.top.toFloat()
child0.alpha=scale
if(scale<0.7){
resetChild(child0)
removeAndRecycleView(child0,recycler)
}
}
return result
}
private fun resetChild(child:View){
child.apply {
pivotY=this.width/2f
pivotX=this.height/1f
scaleX=1f;
scaleY=1f;
alpha=1f;
translationY=0f
}
}
`
比如可以跟LinearLayoutMangear一样往上滑,但是当前显示的第一个item跟现在一样缩小
Hi, assume that you have a RecyclerView containing 100 items inside it.
Each list item has TextViews and you want to make a search with a help of EditText.
When the list has first loaded with containing 100 items and you made a search, you don't see any problem and you can make a achieved search.
But when you scroll the list to the bottom and make for a item which is collapsed by another item(am in it is the main feature VegaLayoutManager) search doesn't show list items. (Search process is succeed but view's does not appear.
I appreciate for any useful information. Thanks for great job !
把demo下载来运行,结果什么都不展示。把recyclerView.setLayoutManager(new VegaLayoutManager());换成recyclerView.setLayoutManager(new LinearLayoutManager(this));有内容,但是没有了效果
I have used recyclerview
as vertical viewpager
with the help of PagerSnapHelper. Only one item at a time will be displayed. When I scroll , it should display previous/next item . How can I use this layoutmanager
for my recyclerview. Please help me!!! Thanks in advance
I want to design a scrollbar but I can't even see the scrollbar in recyclerview.
How to do it with VegaLayoutManager ?
On Notifying adapter on remove it duplicates the row item , When using multiple Item Types layout . Please look into issue .
Its the same issue as issue21.I am adding it cause the issue was not resolved previously. Before i have tested it on kitkat and above . Now its showing the kitkat like behavior on Android N too. I have tested on MOTO Z play.
On kitkat/Android N - On scroll to bottom, the last items scrolls to the top .
Above Kitkat - The last item remains on the bottom of recycler view .
Can it be resolve? or its OS dependent .
Thx
Diaz
findFirstVisibleItemPosition( ) method missing from VegaLayoutManager.
please include this method in VegaLayoutManager.
How can make it work with horizontal recyclerview. It works only with vertical.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.