I have variable loopnum which I initialized it as loopnum = 0;
Now I wanna say that
if(loopnum <6)
{
loopnum++; //And then recall the `Activity` from the beginning.
}
How should I recall the Activity? should I define loopnum static? Because each time after recalling the activity, the value of loopnum will be lost.
Please guide me.
Make it static so you will have only one loopnum instance.