views:

37

answers:

1

This is kind of hard to explain, so i'll try the best I can to inform you on my problem. I have a variable that changes every now and then. In the main app activity i have

int count = 0;

(count is the variable) I would like to only set that at the very beginning. The first time a viewer opens it up I want to set it to 0. After that, I want to save it every time the viewer leaves, and load it when the viewer opens the app back up.

+1  A: 

you write that before any of your function begins.

like

private int count=0;

public static void FunctionBegins() { ... }

william
Thanks. I was just confused. I don't why I didn't think of this
Keenan Thompson
dun worry.. it happened to me also..
william