0

I am currently developing an android app to help coaches.

The idea of the game is not to let the players play in the same position twice. I have a list view which contains the names of the players. I then select a name and drop it on a position which is a TextView.

Is there a way that I can get the app to remember which name was dropped where and not to let that name be dropped there again?

Thanks!

TKV
  • 2,533
  • 11
  • 43
  • 56
  • u can store the position of the player in the shared pref – Developer Feb 13 '14 at 12:47
  • you could remove the name from the ListView, after dropping it. So it wouldnt be re-selectable – Phantômaxx Feb 13 '14 at 12:50
  • 1
    I tried to store the position of a player in a shared pref but it doesn't seem to work the way I hoped! I also removed the name from the list once used and that worked no problem but I then needed to be able to play that player in another position which couldn't be done. Thanks so much for your help! – user3275801 Feb 13 '14 at 12:58

1 Answers1

0

Use a SharedPrefernces to store the value

Check the below link to know about shared preference

use Shared prefernce

Community
  • 1
  • 1
Ameer
  • 2,709
  • 1
  • 28
  • 44
  • Thanks for your help! Do you think it would be possible to maybe do something like an if statement? I've tried a couple but I can't seem to solve it! – user3275801 Feb 13 '14 at 13:27