android - What layout, views, and design to use if I want to add draggable/movable objects? -
if have design application lets user add playing cards screen , drag them move them, views, layouts , elements should use?
the cards can added button or dragged other view.
currently add cards in gridview , flipped, added or deleted, goal rid of gridview.
i've been looking answers everywhere not sure ask, tried 'how move objects inside view' , others no luck. believe should done canvas before learning want know if i'm heading right direction.
since android supports many configurations of screens, should first think if game should developed in normal api of android or using opengl.
if use normal api of android, many layouts can used, think suitable framelayout (use margins of children making being dragged anywhere on screen), , use views need according need show. example, if show images cards, use imageview them.
edit: if minimal api support 11 or above, can use newer api commands drag&drop.
another edit: if wish keep using gridview , check out this solution.
Comments
Post a Comment