Drag and drop a view

前端 未结 1 1681
借酒劲吻你
借酒劲吻你 2020-12-11 13:22

I am trying to drag and drop a button on the screen.i can drag but when i drop the following error takes place. Logcat:

12-05 15:03:00.905: E/AndroidRuntime(         


        
1条回答
  •  执笔经年
    2020-12-11 14:00

    Simply use this method:

    public interface DropListener {
    
    /**
     * Called when an item is to be dropped.
     * @param from - index item started at.
     * @param to - index to place item at.
     */
    void onDrop(int from, int to);
    }
    

    You can see here. And, let you can know more detail.

    0 讨论(0)
提交回复
热议问题