Keeping button disabled through screen rotation (android studio)

97 Views Asked by At

I'm working on making a tic-tac-toe game with android studio and ran into a problem I can't seem to figure out regarding onSaveInstanceState.

I made the bored a 3x3 2d array of buttons and on each click I do b.setEnable(false).

This works well except when I rotate the screen the buttons become enabled again. I'm not sure whats the best (or even a way) to go about saving this state.

2d arrays aren't allowed to be passed through onSaveInstanceState.

I'm not sure if anyone needs to see my code but I can post if need be. basically is there a way to save every attribute of a widget you changed through code, or even just one specific attribute through a screen rotation?

0

There are 0 best solutions below