开发者

Setting a Variable Once... I don't Know How to Explain (Android Projgramming)

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.


you write that before any of your function begins.

like

private int count=0;

public static void FunctionBegins() { ... }

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜