Comments (7)
Preview version WITHOUT data binding is now available:
compile 'com.xwray:groupie:2.0.0-alpha1'
Preview version WITH data binding may take a few hours to make it to jcenter:
compile 'com.xwray:groupie-databinding:2.0.0-alpha1'
Existing code: MyItem extends Item
should change to MyItem extends BindableItem
.
All other references to Item
and Group
should be able to remain as-is.
A fun side effect of the rewrite is that you can mix binding and non-binding Items, so if you have a large RecyclerView you're thinking about switching over, you can now do it gradually.
I'm planning to cut the production build after I give them a full once over for playing nice with Kotlin, hopefully next week!
from groupie.
I'm working on this now. My current approach (so far so good) is to split the library so non-data-binding Groupie doesn't require or include it. Of course, it will be a breaking change.
I'm considering this naming convention: you pick one of
com.xwray.groupie:groupie-databinding:2.0.0
[Data binding]
or
com.xwray.groupie:groupie:2.0.0
[No data binding]
The only problem I have with this is it looks like no data binding is the default or suggested version. Obviously, all the current users use data binding and I'd hate to sow confusion (not to mention, I would like to steer undecided people to data binding as a default). I'm also considering instead something like groupie-vanilla
for the non-data-binding version. Input welcome. :)
from groupie.
I refined this a little: #96
If you use Kotlin Activity Extensions, then you can use groupie without creating any view holders, just the same as data binding. I like that a lot.
Still not in love: you have to explicitly declare Item<ViewHolder>()
and GroupAdapter<ViewHolder>()
for the vanilla version. Continuing to think about naming to resolve the issue.
from groupie.
How about an interface with name ViewDataBinding, providing necessary methods on it. along with one bind(Object) method to pass data for actual binding.
So on the user's part, user now will have to create two class file per view item, one extending Item, other implementing ViewDataBinding.
from groupie.
Hi Lisa,
I completely see your point for databinding
as default and I greatly appreciate your effort to provide also a non databinding version.
If your main goal is to favorite the version with databinding, having that version as default lib name makes totally sense 👍🏻
I'm pretty sure that vanilla
gives enough information or creates enough curiosity to make users to check this variant
.
Can't wait for a ViewHolder version to try it out in my projects 😍
from groupie.
Thanks @lisawray for the amazing work!!
Personally I think that the best way would be to provide the core
without any data binding, and then have people that want to use it add the relative dependency. I understand that this would be a breaking change for existing users, but this is also a 2.0
version so breaking changes are kind of expected :)
from groupie.
Agree with @Takhion. @lisawray, the naming convention you listed above will work fine since it would be a breaking change anyway.
from groupie.
Related Issues (20)
- I'm trying to implement. But not some error... HOT 7
- [Crash] ViewPropertyAnimator.java line 1111 - Tmp detached view should be removed from RecyclerView before it can be recycled HOT 2
- [ANR] com.xwray.groupie HOT 1
- Failed to resolve: com.github.lisawray.groupie:groupie:2.9.0 HOT 9
- [Crash] Crashes have occurred as a result of the use of groupie HOT 6
- How not disable recycling for all/some items?
- Support for Jetpack-Compose? HOT 7
- Infinite horizontal scroll HOT 1
- How to switch from list layout to grid layout using groupie ? HOT 1
- androidx.constraintlayout.widget.ConstraintLayout cannot be cast to android.widget.FrameLayout HOT 6
- Is it possible to make ui like Instagram Discover HOT 2
- Groupie Examples Need To Be Updated
- Updating specific section / group
- GroupAdapter item count is misrepresented if empty groups are present
- Vulnerability detected in dependency used for the latest version in Maven Repository: 2.9.0 HOT 1
- getItem(position).notifyChanged(payload)
- I can't remove more than one item in my GroupAdapter.
- Crash com.xwray.groupie.GroupAdapter.onViewDetachedFromWindow GroupAdapter.java, line 261 java.lang.NullPointerException: Attempt to invoke virtual method 'void h8.j.t(h8.i)' on a null object reference
- com.xwray.groupie.GroupAdapter.onViewRecycled java.lang.NullPointerException
- RecyclerView + Groupie , Big Data Will Scroll Slow HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from groupie.