以下代码用于将项目从tileview控件拖放到树列表控件。它使用devexpress控件。
但是在放下该项目之后,被拖动的项目的预览像下面的图像一样在窗口上停留,并且直到鼠标光标悬停它时它才会隐藏。 有隐藏的方法吗?
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder();
OkHttpClient okHttpClient = clientBuilder.build();
MultipartBody.Builder builder = new MultipartBody
.Builder()
.setType(MultipartBody.FORM);
for (int i = 0; i < fileList.size(); i++) {
File file = new File(fileList.get(i));
builder.addFormDataPart(path, path,
RequestBody.create(MediaType.parse("application/octet-stream"), file));
}
RequestBody body = builder.build();
final Request request = new Request.Builder()
.url(upLoadUrl)
.post(body)
.build();
okHttpClient.newCall(request).enqueue(new Callback() {})
在这里,我使用MouseDown和MouseMove事件开始拖放操作