0

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.

  • Even if I will draw the frames already inside a background image, how would the cards sit exactly in these frames?

Tips? ideas? anything that comes in mind will really help me!

1 Answers1

1

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 ;)

enter image description here

Community
  • 1
  • 1
Manuel Pires
  • 637
  • 3
  • 19
  • Big thx, for you're response, could you give me an idea for the board and the card zones? – Alex Fleshler May 22 '13 at 14:22
  • The idea is just for your hand and deck... The space above you can use to display the cards played... It's not the most beautiful solution but you can get some ideas searching in google for images. – Manuel Pires May 22 '13 at 14:51