ApmeM / android-flowlayout

Linear layout, that wrap its content to the next line if there is no space in the current line.
2.03k stars 370 forks source link

[Discussion] Should this library be deprecated in favor of Google's FlexboxLayout? #80

Open Dev-iL opened 7 years ago

Dev-iL commented 7 years ago

Recently I came across FlexboxLayout by Google. It seems like that library can do what flow-layout can, and more (there are many animated examples in the readme). Most importantly - it's being actively maintained and developed.

It is my opinion that everybody who uses flow-layout should transition there instead. What do you think?

pablichjenkov commented 7 years ago

FlexBoxLayout does not seem to be using any mechanism to recycle views. They are more oriented to laying out children views as per flex-box specs. In mobile, the hardest part of any parent view is recycle it's view children as they gets scrolled and reposition on the screen viewport. In fact is a must since devices are short in memory and processor resources. Seems like their purpose is use that library for forms and this type of stuff but not for handling model collections. At least that's my perspective.

Dev-iL commented 7 years ago

What about https://github.com/google/flexbox-layout/blob/master/RecyclerView.md ?

On Sat, Mar 11, 2017 at 5:13 AM, pablichjenkov notifications@github.com wrote:

FlexBoxLayout does not seem to be using any mechanism to recycle views. They are more oriented to laying out children views as per flex-box specs. In mobile, the hardest part of any parent view is recycle it's view children as they gets scrolled and reposition on the screen viewport. In fact is a must since devices are short in memory and processor resources. Seems like their purpose is use that library for forms and this type of stuff but not for handling model collections. At least that's my perspective.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ApmeM/android-flowlayout/issues/80#issuecomment-285837588, or mute the thread https://github.com/notifications/unsubscribe-auth/AGNUM3BpF1Zy3Bg8Tk8Uu5ocLAaa0qp2ks5rkhFpgaJpZM4MIcRU .

pablichjenkov commented 7 years ago

Thanks for pointing out this branch, I had just known about the work in master. Seems very challenging and very interesting. The fact that original flex specs do not consider recycling means the library will make a mix between Android recycling standards and flexbox. I read part of the code and some of the layoutmanager callbacks match steps described in the flex algorithm spec, which is good, although it is not an implementation detail discussion but rather a maintainability discussion. Having into consideration that is supported by Google weights a lot. As seen before, many community initiatives in UI design got re-implemented and distributed by Google, for good in most of the cases. So I agree that soon or later that library will deprecate the community ones.