Comments (10)
Hello @danielpassos, during the development I also thought to divide the listeners, but in the end I opted for 1 only. I can separate them again now.
But I will not remove the parameter from the constructor because it's easier for a developer (the adapter can do these assignments for him), because changing the signature will change the current implementation of hundreds of people, because developers don't know the internal names of the listeners and they have to check the adapter code.
from flexibleadapter.
because changing the signature will change the current implementation of hundreds of people
I agree with that, I'll put it back in my PR, but pass a Object
in the contructor seems wrong to me. Maybe deprecate that and create a new one or only deprecate that to remove in future releases. wdyt?
from flexibleadapter.
Wait to change the PR.
Also I was thinking that the method startUndoTimer can accept the listener for confirmation of deletion: basically it's only in that occasion and it is not necessary to have listener as member but can be kept as final parameter.
from flexibleadapter.
Wait to change the PR.
Done. I put it back as @deprecated
but leave the example app using the new one
Also I was thinking that the method startUndoTimer can accept the listener for confirmation of deletion: basically it's only in that occasion and it is not necessary to have listener as member but can be kept as final parameter.
Not sure if I got you point here.
from flexibleadapter.
I mean to pass the listener to this function:
public void startUndoTimer(final OnDeleteCompleteListener listener, long timeout) {
mHandler = new Handler(Looper.getMainLooper(), new Handler.Callback() {
public boolean handleMessage(Message message) {
if (listener != null) listener.onDeleteConfirmed();
...
}
});
...
}
from flexibleadapter.
Gotcha. Must better and done! :)
from flexibleadapter.
@danielpassos, so about OnUpdateListener
, I am not sure to keep it, because after all I don't see a big advantage of an Asynchronous loading: usually the list is already loaded Asynchronously somewhere else.
I wanted a suggestion from you.
from flexibleadapter.
I totally agree with you but we need to keep in mind it will broke the old project/compatibility. I know it's sucks, but it's a library and what we do in libraries/frameworks is:
- Make it as deprecated
- Update the docs
- Announce in some place we are about to remove it.
- In a new version bumping
MAJOR
(see the semver) and remove it. It make clear for the developers we broke the compatibility.
from flexibleadapter.
Indeed it will break compatibility, but before release as major version, I wanted to add new functionalities, such as animation on loading. I already know how to do it, maybe multi ViewHolder, fix the way how ItemAnimator are used, use or import a nice SearchView, that I have identified, in the example App.
So your changes will not be released soon, and we have time to inform ppl about these deprecation.
In the meantime I have to work also on others projects...
Thanks for the suggestion.
from flexibleadapter.
You can release a small version bumping MINOR
with the new listeners or for every new feature you add, and than release a new one with a new big improvement/removing deprecation bumping the MAJOR
from flexibleadapter.
Related Issues (20)
- Sticky headers lag when using beginDelayedTransition()
- Sticky header item view
- Double sticky header
- Support theme refences on fast scroller
- Probable major bug in private filterItemsAsync() method.
- Items are not deleted after filter
- Elevation is not applied correctly with getActivationElevation HOT 1
- Comment of return value of 'OnItemClickListener.onItemClick()' may mislead.
- 'SelectableAdapter.toggleSelection()' doesn't toggle selection in SINGLE mode. HOT 1
- FastScroller - setHandleAlwaysVisible does not effect
- Example of eu.davidea.flexibleadapter.FlexibleAdapter.DiffUtilCallback implementation HOT 1
- [Sticky headers]The real Header is invisiable
- How to collapse all items at start? HOT 1
- FYI: Bintray is shutting down on February 1st 2022 HOT 17
- Adding random text to item when scroll list
- flexibleadapter with sqlite
- AndroidX - Layout Inflation Failing on dependency later than com.google.android.material:material:1.0.0
- Further support? HOT 4
- Trying to get in touch regarding a security issue
- Sticky header items [Image Views, Text views with clicks] with expand/collapse feature
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 flexibleadapter.