drag-and-drop

Drag and Drop for imageview not working

一世执手 提交于 2019-12-24 04:34:25
问题 My RelativeLayout has an image. I am just trying to make it draggable in the entire layout.The issue is that every time I drag and drop, it goes back to the original position. Here is my drag_layout.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/mainView" android:background="@drawable/bg_animation" tools:context="com.example

NineOldAndroids library for Drag/Drop in android

淺唱寂寞╮ 提交于 2019-12-24 03:55:09
问题 i want to use Drag-and-Drop in my app. so I should use Nine Old Androids Library. I searchrd in GitHub and found out this solution: https://github.com/JakeWharton/NineOldAndroids I also download "Nine Old Androids.2.4.0.jar" from this site. and import this jar file to my app. but it doesn't work. does"dependency" need? would you please help me how can I do this? thanks 回答1: if you use gradle in your build.gradle repositories { mavenCentral() } dependencies { compile group: 'com

Drag and drop in listview C# [duplicate]

故事扮演 提交于 2019-12-24 03:48:15
问题 This question already has an answer here : Drag and drop listview C# (1 answer) Closed 6 years ago . I currently trying to have my program able to drag a file and and drop it into the listview. I have see many sample and most of them have the following code: private void listView1_draganddrop(object sender, DragEventArgs e) However after I implmeneted those code I have the few error i encounter..first is there no overload for listview1_SelectedIndexChanged match delegate System event handler

Why am I getting an InvalidDnDOperationException?

怎甘沉沦 提交于 2019-12-24 03:12:46
问题 I'm sorry; I don't like asking "why am I getting exception ?" questions on StackOverflow (bit ironic now that I think of it...) , but I can't figure out the cause of this exception! I've searched for a solution, but those that popped up were either for a subtly different exception, when people were trying to access a Transferrable outside of an event handler, or not ever answered at all. I'm trying to do this right inside the DropTargetListener#drop(DropTargetListener) method. I'm testing

How to implement a drag'n drop from a qt application to a file system folder?

[亡魂溺海] 提交于 2019-12-24 03:07:30
问题 I'm developing a Qt application on Mac OS X (Snow Leopard), which displays the datas of a big file into a view. I can extract theses data onto a file system folder with an entry "extract" of a menu and, now, I would like extract them with a drag'n drop. I tried to implement a custom QMimeData, and its protected method retrieveData like the solution of this ticket: Qt 4.x: how to implement drag-and-drop onto the desktop or into a folder?). In this method, I extract the data into a tmp folder

GWT capturing drag & drop events

梦想的初衷 提交于 2019-12-24 03:05:17
问题 I'm trying to capture dragover and drop events. Right now I'm capturing those events adding a dom handler to my RootLayoutPanel: dragOverHandler = RootLayoutPanel.get().addBitlessDomHandler(this, DragOverEvent.getType()); dropHandler = RootLayoutPanel.get().addBitlessDomHandler(this, DropEvent.getType()); The problem is this code does not capture the events when showing a popup and the drag/drop is over the popup itself or the glass around it. I have also tried using a native preview handler,

Drag&Drop File Attribute is ReadOnly

牧云@^-^@ 提交于 2019-12-24 02:47:07
问题 I created an Attached Property which registers the drag and drop events and requests the operations: move, link, copy. UIElement dragablecontrol = d as UIElement; if (dragablecontrol != null) { dragablecontrol.AllowDrop = true; dragablecontrol.DragEnter += Dragablecontrol_DragEnter; dragablecontrol.DragStarting += Dragablecontrol_DragStarting;//does not get fired dragablecontrol.DragOver += Dragablecontrol_DragOver; //e.AcceptedOperation got move, link, copy dragablecontrol.Drop +=

How to drag an item outside a ListView in QML

主宰稳场 提交于 2019-12-24 02:05:21
问题 I am developing a QML application which basically contains two ListView. I would like to copy a QML item from one ListView to another. I tried to handle this by setting Drag property in the delegate but the item cannot go outside the view when I drag the item, I think the Flickable container handles mouse events. So, I want to try the following: create a mousearea which overlaps the to ListView create a new object by calling **createComponent() / createObject()** reparent this object to the

Drag and Drop and OnClick TextView

白昼怎懂夜的黑 提交于 2019-12-24 01:26:31
问题 I'm creating drag and drop text view and I need this text view also can be clicked. My code as per below : <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/bg_grey" android:orientation="vertical" > <GridView android:id="@+id/gridview" android:layout_width="wrap_content" android:layout_height="wrap_content"

Drag and drop ajax file upload

二次信任 提交于 2019-12-24 01:23:35
问题 I want to be able to upload files with drag and drop functionality via ajax. However, IE doesn't seem to support any type of drag and drop. Is there any way for IE to accept file drag and drop? 回答1: http://jquery.malsup.com/form/ This plugin will handle an ajax file upload for you. 回答2: IE10 is the first version of Internet Explorer to support file drag and drop. 来源: https://stackoverflow.com/questions/8531428/drag-and-drop-ajax-file-upload