Android Studio - Open New Activity Tutorial (2018)

Veröffentlicht am: 01 September 2018
auf dem Kanal: Programming Hustle
140
6

In this video you will learn how to create and open new activity in Android Studio.
As a first step we will create a layout for our first initial activity. We just need one button. Let's call that button "Open Second Activity".

Now we want to create second activity. As a layout for second activity just place one TextView with a text: "This is second activtiy" or whatever you want.

When you are done with layout files go to your mainActivity class and declare Button variable. Set onClickListener for that button and put in openSecondActivity() function inside onClick(). Note that we haven't yet created this function(openSecondActivity).

Last step is to create openSecondActivity method. Inside this method just create Intent as shown in video and call startActivity() method, again, just like shown in video.
--------------
Make sure you subscribe for more tutorials :)


Auf dieser Seite können Sie das Online-Video Android Studio - Open New Activity Tutorial (2018) mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Programming Hustle 01 September 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 140 Mal angesehen und es wurde von 6 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!