I would like to programmatically drag one view and release it on top of another for initialization purposes, is this possible?
EDIT: I’m looking for a way to simulate a drag&drop
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can remove Views from Layouts and add them to other Layouts (if that’s what you are looking for)
There is no drag&drop animation and it might give strange results but it’s possible.
A
ViewGroupwould be aLinearLayout,RelativeLayoutand those.For simulating Drag&Drop events you could call the onDragListener manually but there is one problem:
expects a
DragEventwhich has no public constructor so you can only call it withnullThere might be a way to create one via a faked Parcel but that going to be ugly.
Another possibility is maybe to create touchevents but Idk if that would work. At least the monkey could probably do that.