random layout xml in android

constancerail

New Member
i'm asking again in here, i want to random my layout using this code \[code\]public class testing extends Activity { /** Called when the activity is first created. */ private Integer [] mLinearLayoutIds = { R.layout.games0, R.layout.games1, R.layout.games2, R.layout.games3, R.layout.games4, R.layout.games5, }; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Random random = new java.util.Random(); int rand = random.nextInt(6); setContentView(mLinearLayoutIds[rand]); }}\[/code\]but, every time layout show in before, can show again. how to mark for a layout who show before so do not show again? thanksp.s : sorry for my bad english
 
Back
Top