I need a drag able button just like unlock button in Android default emulator (similar to image below). Can any one help me how to implement it? I need layout or code for it.

I need a drag able button just like unlock button in Android default emulator (similar to image below). Can any one help me how to implement it? I need layout or code for it.

Copyright © 2021 Jogjafile Inc.
To make the button draggable
attach a listenerto the Object such asOnTouchListener, OnLongClickListener. When the user drags the data a image is displayed and it is called as Drag Shadow. It is initialized using the constructor View.DragShadowBuilder. The dragging is started usingstartDrag()method which has four parameters.To create a Drop view we must attach
OnDragListenerto the view where the data is to be dropped. Various actions which execute during the process are.Sample code:
For more details, please refer here.