Click here to Skip to main content
15,891,903 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I'm creating a sliding puzzle game in Android. I tried using setTag() method to tag the tiles so that I can know which tile it is after shuffling.

Is there any other alternative to the setTag() method.

Any help is appreciated

Thanks in advance :)
Posted

1 solution

Make a Tiles Class that will extends the View (if you want particular view like linearlayout or other than extends the class from that particular view) then make properties in class as many as you want. Just make a private variable in class and then Get and Set method of it.

Just use the Tiles class as view instead of android default view.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900