Reputation: 25
I am starting to develop an android trading card game, I have love to ask a couple of questions and recieve some feedback from more experienced developers, lets get on with my questions.
1 - How can I create a board where I can lay cards down? like really I have no idea... maybe fill a simple 'xml layout' with a background image that already has the fields where the cards should be.
2 - How can I implement a way for the cards to listen for like drag from my hand and drop in the field.
Tips? ideas? anything that comes in mind will really help me!
Upvotes: 0
Views: 839
Reputation: 637
1- You can use some ImageView/ImageButtons to show the cards. Using a relative layout you can show the cards in the position you want (even overlapping)...
2- For the movement, you can drag the image to a zone that you define. This post can help you with that: how to drag an image by touching in android?
Hope it helps ;)
Upvotes: 1