Introduction In this article, we will continue with the practical demonstration of Android development using our “Demo One” Android project as an example. Note that in my previous article, I demonstrated how to add AlertDialog to MainActivity.kt, and programmed it to show when the “Click Here to Proceed” button is clicked. The AlertDialog contains a button with the text “NEXT” (as in Figure 1). Figure 1 When the “NEXT” button is tapped or clicked, the AlertDialog will close, and then, the app will navigate back to MainActivity. In this article, we will add a new Activity named “SecondActivity”. Next, with the use of “intent”, we will program the AlertDialog “NEXT” button to navigate to SecondActivity when tapped. Next, we will add top app bar to our SecondActivity. Let us now open our “Demo One” project (as in Figure 2) and continue with the development process. Figure 2 Creation of a new Activity named “SecondActivity” There are different methods of creating ...
We are committed to making significant positive impact by providing excellent articles and tutorials on Android app development, Computer literacy, and Research Project guide.