mercredi 6 mai 2015

New Activity taking 15 seconds to open in lower android versions, have someone experienced same?

In my game, i am calling a new activity when some condition is met. It works fine for android versions above 4.4, but in lower versions it takes about 15 seconds to open new activity, till then it is stuck to same activity. What can be the issue?

On create func of second activity is --

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_show_game_over);
    this.score = getIntent().getExtras().getInt("score");
    TextView text = (TextView)findViewById(R.id.show_score);
    text.setText("Score: " + score + "");
    TextView textView = (TextView)findViewById(R.id.levelText);
    this.level = getIntent().getExtras().getInt("level");
    textView.setText(levelString[this.level]);
}

Aucun commentaire:

Enregistrer un commentaire