How to save instance of recyclerView after a drag and drop - android-recyclerview

I want to save the state of recyclerView after the drag and drop is there any way so far I have tried everything like sharedPreference,savedInstance etc.. is there any way to solve this issue. What I want is when I close the app and reopen it the recyclerView shall remain the same way as it was during drag and drop.

Related

How to create a unique RecyclerView for another RecyclerView in a separate activity

I have an application in which on the first activity I create an Item in the recyclerView (a section consisting of one or two words), and by clicking on it I go to another activity where the RecyclerView is also located in which I create ordinary notes by filling out the adapter. The problem is that for each Item I need a separate recyclerView, and wherever I clicked, the same recyclerView opensenter image description here
enter image description here
It's the basic data problem I think.
Maybe You're not passing the right data when an item is clicked. Try putting some logs or debug points where you pass the data in the next activity to set it in the recyclerview.

NSTableCellView Drag Handle

I've created an NSTableView that uses custom views for each row. In our design the user single clicks on a row in order to perform an action, which causes the table to be hidden (think a browser bookmarks menu implemented using a table view). I want the user to be able to enable an editing mode, which causes cells to display a drag handle (iOS style) that they can then use to reorder the rows. I've got the edit mode working and have implemented the necessary data source methods to enable drag and drop. The issue I'm struggling with is to only allow the user to drag using the drag handles, instead of being able drag the entire row. Is there a way to customize the hit testing so I can only have a drag session start when the mouse is over my drag handles?
Here's is an example of the interface in editing mode:
For future reference, I found the following function that I can override in the NSTableView in order to determine if a drag session should begin:
- (BOOL)canDragRowsWithIndexes:(NSIndexSet *)rowIndexes atPoint:(NSPoint)mouseDownPoint;
This allows me to check if the mouse down point is over the drag handle.

IntelliJ - Go back and forth in one split view only

I am able to use the shortcut to go back and forth if I only have one view.
But sometimes when I open a split view to work on some specific file. If in this split view I ever go to the file opened in the main view. Then my cursor is moving to the main view, which annoys me.
Is there a way that I can just move back and forth in the particular view. Or in another way, is there a way for me to work on a file in a separate window completely independent. Like having two IDE openings same project.

Prevent the Master View to be shown when dragging UIimageView close to it in a iPad SplitView Application

My IPAD application is a kind of a game in which the user has to set the images in the right order.
For example, there are four fairy tale images that have to be rearranged in the right order basing on what comes first and last in the story.
If i drag the image close to the Master View when i'm running in landscape or portrait mode the event which opens the master view is firing and hiding my image behind the Mater View.
I searched all around and I did not find anything which stops this master view to be shown when i drag a finger from left to right.
The detail view always have to be shown because the user can't lose focus, so always show the Master View is not a solution.
Is there a way to disable/prevent the master view to open when touching the screen from left to right like I described?
I tried to post a screenshot here but I have no reputation to do that, sorry.
As CodaFi answered up there, I must set the presentsWithGesture attribute when creating my splitview like below:
if ([splitViewController respondsToSelector:#selector(setPresentsWithGesture:)])
[splitViewController setPresentsWithGesture:NO];
It prevent the swipe gesture to open the master view.

Please put me on the right track with Drag Drop on IOS

I am creating a bit of a video mash up app (like imovie) and the first function I am tackling is the ability to drag a thumbnail from a video library and drop it on a time line. I was able to add the drag code to the video thumbnail class so when you touch it, it creates a drag proxy view which moves around when you move your finger. Next I want to be able to drop it on the time line.
My Timeline is also a uiview and I am unsure of how it can receive notification that the thumbnail is being dragged over it! It will need the position of the thumbnail so that it can show it on the timeline and the duration of the clip and such (information that I have attached to my video thumbnail object)
How would you approach this issue? The App is for ipad and is on ios 5.
Thanks for any pointers!
You will most likely want to subclass the UIView. You can look at this post:
https://stackoverflow.com/a/4130641/1535038
Mainly you will want to see if the My Timeline view is being touched, and then see if you are in the middle of a drag or not.