Prevent drag drop of custom mimetype to EditText

前端 未结 4 2211
南旧
南旧 2021-02-20 02:41

I have a custom mime type which I am intending to use to drag and drop application objects within the app. This seems to be working but I\'m finding that the EditText fields ar

4条回答
  •  长发绾君心
    2021-02-20 02:56

    You may write

    edit.setEnabled(false);
    edit.setFocusable(false);
    

    just after calling startDrag(), and restore old values for that particular editText control just after DragEvent.ACTION_DRAG_ENDED.

    But, honestly, this is quite dirty approach.

提交回复
热议问题