How do I check if pieces are put together in Android puzzle game?

111 views Asked by At

I have 4 pieces initially.

k

A child must put them in this correct order: heart, yellow star, green star, grey star.

I suspect i can create some kind of container for every piece where they are drag-and-dropped: ii

I implemented drag-drop, but how to implement 'containers'? What are they? in the expert tab in studio i see image switcher, view flipper, view animator, view switcher.

What do I do?

At this point I don't need to show the source code, as I need someone to point in general direction.

1

There are 1 answers

0
Bojan Kseneman On

Container should be a child of the class ViewGroup, because that class allows you to add View objects to it. In your case that object is an image. The most basic three are LinearLayout, RelativeLayout and FrameLayout. Any one of these three will solve your problem.