Comments (7)
I actually followed that same article as an inspiration for the swipe to dismiss.
Drag and drop should be possible but you would have to have a "order" field on the Realm object so that once a field is dragged around, the underlaying data structure can be updated as well as that the order is persisted between data/screen views.
@kmare - Do you usually have a "order" field in your data structure for this? If so, that should make it possible.
This would be a pretty cool feature to add.
from realm-recyclerview.
I haven't really started yet working on that feature, but yeah.. I plan on adding an "order" field. I don't think it's possible to (realistically) implement it any other way. Following the mentioned tutorial/links I actually implemented it on a few non-realm (sqlite) projects with custom logic just fine. Unfortunately, I don't think I'll have much time to implement it any time soon for realm-recyclerview, but if I do, I'll gladly send a pull request.
from realm-recyclerview.
@kmare - sounds good. Yea, I'll see if I can maybe tackle this on the weekend. Should be pretty straight forward as long as I can manage drag/drop updates and realmUpdates. One solution for that might be to turn off Realm updates while the user is dragging items around. Anyhow, I'll dig into it. I'll update this thread once I start working on it so that we don't execute on it in parallel.
Do you have a use-case / would utilize it in one of your apps?
from realm-recyclerview.
Unfortunately I'll probably have time to work on it in a couple of weeks during the christmas period anyway. Right now I'm not really using realm in a real world project. I'm mainly evaluating it in different use cases for future projects I'd like to work on. So nothing serious at the moment. For now I just built a note/google-keep like app (I know, very original..), adding features just to see what I'd be missing from realm that I wouldn't with normal sqlite operations. So far, I'm not exactly happy with the migration part of realm, but it looks like they're re-implementing it anyway.
Thanks again for your work, it's much appreciated!
from realm-recyclerview.
you would have to have a "order" field on the Realm object so that once a field is dragged around, the underlaying data structure can be updated as well as that the order is persisted
It would be really nice if you could just use a RealmList
(which is intrinsically ordered) instead of a query result.
It even has a nice move()
method to reorder entries: https://realm.io/docs/java/latest/api/io/realm/RealmList.html#move-int-int-
from realm-recyclerview.
I have a field basis on which I need to sort the list, this field changes on user action rather drag and drop, but changing the order at run time adding one more extra element also randomly replacing other elements. Thought this issue is relevant here.
from realm-recyclerview.
Hi I wondered if anyone started working on this feature?
from realm-recyclerview.
Related Issues (20)
- Is it possible to animate RealmRecycleView when i change sort directional?
- example app ArrayIndexOutOfBoundsException: rowIndex > available rows: 2 > 2
- Realm recycler view not refreshing on first insert HOT 1
- How to Make Recycler View show rows from bottom HOT 1
- java.lang.NullPointerException null object reference in Fragment
- Can I group by any field? HOT 1
- Please update to Realm Java 3.0.0
- Can't create a RealmRecycleView Programmatically
- Realm Recyclerview not working with Realm 3.5.0 HOT 1
- Error:(39, 14) Failed to resolve: com.github.thorbenprimke:realm-recyclerview:0.9.25 HOT 1
- Doesn't work with android studio 3.0
- How can we get the LayoutManager? HOT 2
- Enable swipe to delete only in one direction?
- Need to draw background with an icon when the user swipes an item
- Fatal signal 11 while deleting object from Realm
- How to scroll to position not softly?
- how to fire loadmore after fetching and showing every 100 records from realm HOT 1
- Issues When Having Multiple View Types HOT 1
- Attempting to use Realm-recyclerview with Object Server.... HOT 4
- Size APK HOT 1
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 realm-recyclerview.