LightBlog

vendredi 15 avril 2016

Battleships interactive table (android studio)

Hello!
I'm doing an Android studio project called Android Battleships from scratch. I ran into a problem. When designing player ship arranging activity I need a table with clickable cells that should return it's row and col number or at least it's ID. I tried doing this with 64 (8x8table) ImageButtons but that doesn't seem like a good solution considering I have to initialize all of them and set onClick listener cases for all of them. Also there should be switches that determine how many cells I can choose for the current ship. Any ideas? Or any better solutions? Maybe inputing coordinates and the image view elements in table show ships (different colored cells). I hit a wall. Any help welcome! Thanks!


from xda-developers http://ift.tt/1RYeOv5
via IFTTT

Aucun commentaire:

Enregistrer un commentaire