High Imitation flower field iOS label move effect, long press each item to drag to the position you want, the back position to move the completion effect.
This project is suitable for the study of the GridView drag effect of friends download.
Learn about Android animation effects.
This project is mainly implemented by Draggrid,
/** in the case of drag */
private void Ondrag (int x, int y, int rawx, int rawy) {
if (Dragimageview! = null) {
windowparams.alpha = 0.6f;
// windowparams.x = RAWX-ITEMWIDTH/2;
// windowparams.y = RAWY-ITEMHEIGHT/2;
windowparams.x = rawx-win_view_x;
windowparams.y = rawy-win_view_y;
windowmanager.updateviewlayout (Dragimageview, Windowparams);
}
}
/** in the situation.
private void OnDrop (int x, int y) {
Gets the postion of the item below the drag position, based on the x, Y coordinates dragged to
int temppostion = pointtoposition (x, y);
if (temppostion! = adapterview.invalid_position) {
Dropposition = temppostion;
Dragadapter Mdragadapter = (dragadapter) getadapter ();
Show the item you just dragged
Mdragadapter.setshowdropitem (TRUE);
Refresh the adapter so that the corresponding item is displayed
Mdragadapter.notifydatasetchanged ();
// }
}
Operating effect:
Effect Source: http://www.itlanbao.com/code/20151112/10000/100641.html
"It blue Leopard" high imitation flower field iOS label mobile effect