I'm trying to understand finishing an activity and starting another.
<activity
android:name="com.blabla.game.OyunActivity"
android:label="@string/title_activity_oyun"
android:noHistory="true" >
</activity>
OyunActivity :
int number = 1;
while(true)
{
if(number == 52)
{
Intent intent = new Intent(this, GameOver.class);
startActivity(intent);
finish();
}
number++;
Log.d("TAG", number);
}
It's starting GameOver activity but OyunActivity not finishing. It's keeping increase number variable and outputting it to Logcat.
PS : Actually my code not really stupid like this. I'm trying to make a basic game. It should stop and open GameOver activity when number = 52