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 :)
In questa pagina del sito puoi guardare il video online Android Studio - Open New Activity Tutorial (2018) della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Programming Hustle 01 settembre 2018, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 140 volte e gli è piaciuto 6 spettatori. Buona visione!