Search code examples
androidandroid-layoutcanvasonclicklistenerchess

Android object movement when click button


i want to create rectangle object and when click button it goes to the layout x and y directions.in simply i want to create some chess Bord and move rectangle when click button.it means chess Bord have 8*8 rows.when i click some button then based on value in button move object.

Thanks SSV


Solution

  • You can use animations: http://developer.android.com/guide/topics/graphics/view-animation.html

    and you can activate the animation in the OnClickListener.