How can I call a different xml on the second call of my onResume in Android Eclipse project
问题 I make an Android app and I want in my MainActivity.java to make a counter of my onResume method calls so that during onResume's: 1) first call to setContentView(R.layout.layout1); and 2) second call to setContentView(R.layout.layout2); According to documentation that I seeked I should make a static variable that will be increased for every onResume's call. How could I implement it please? Thank you in advance. 回答1: Perhaps something like this (rough template) public class MainActivity {