Is there a way to drag and drop only when a specific button is clicked on recyclerview item? - android-recyclerview

I'm using the ItemTouchHelper for drag and drop.
As I see, ItemTouchHelper only provides the ability to drag over any part of the item.
But I need to implement drag and drop only on a specific button.
button to drag an item

Related

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.

How to drag two view synchronously?

I want to move puzzle piece by dragging the sliding button.

how to create a vertical menu bar with drop down items in vb.net

Is it possible to create a vertical menu bar with drop down items?
I have created a vertical menu using buttons and placed them into a panel and assigning the panel's dock property to left, but couldn't find a way to add drop down items to each button.
Can someone help how to create dropdown items?
Like this? You can find MenuStrip Tool in Toolbox. Add it to the form. Right-click and select Edit Items.... You can add MenuItem (Menu1 in my example), and add SubMenus from Menu1 Property's DropDownItems.

How to display show/Hide button in highlight regular mode of NSOutlineView?

How to display show/Hide button in highlight regular mode of NSOutlineView?
I have a grop item at the top of NSOutlineview. I try to display show/hide button in that group item, but I can't find any method to do it. The source list mode can display it but regular mode doesn't.
Is it possible to display show/hide button in highlight regular mode of NSOutlineview?
thanks for helping
This behavior is specific to the source list appearance. There is no public API for getting around this, as it's an intentional enforcement (on Apple's part) of standardized appearances. You could dig around in the headers to look for a way to "hotwire" things, but use of private API bars you from distributing your app through the App Store.
The easier (non-private-API-using) route is to create your own cell view with a borderless button with show/hide title. Use a mouse tracking area (see NSTrackingArea) on the cell view (the superview of your button) to set the button's alpha (via its animator) to fade the button in/out on mouse in/out. Your button would tell the outline view to expand/collapse its cell view's represented item (the easiest way would be to define an outlet to the button via your custom NSView cell view class and configure the button's target/action when the cell view is created for the item).

MenuItem in Compact Framework 3.5

Is there anyway to programmatically force a MenuItem to raise their popup event? Basically, if you click on it with your stylus or finger, it shows the MenuItem collection for that specific MenuItem. I'd like to be able to do by using a button that I capture.
If you add your menu items to a ContextMenu you can then call ContextMenu.Show with a position and it will show the context menu at that position.
So you could do that in your button click event. Or did you want to 'fake' taps on the menu buttons on the soft menu bar?