Open random activities when button is clicked

前端 未结 2 582
故里飘歌
故里飘歌 2020-12-10 10:05

I have 5 activities. What I want to happen is to open random activities when the Start button is clicked on the MainMenu.

For Example: Activity 1 -> Activity 4 -&g

2条回答
  •  猫巷女王i
    2020-12-10 10:42

    @Farbod Salamat-Zadeh your solution is great, except that part

    Bundle extras = getBaseContext().getIntent().getExtras();
    

    would result in mistake in Android Studio 2.1. This should instead be

    Bundle extras = getIntent().getExtras();
    

提交回复
热议问题