From the course: Android Development Essential Training: 3 Navigation

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Start activities with explicit Intents

Start activities with explicit Intents - Android Tutorial

From the course: Android Development Essential Training: 3 Navigation

Start my 1-month free trial

Start activities with explicit Intents

- [Instructor] Let's get a button to our EntryActivity that when clicked will take the user to our main activity screen. We'll start by adding a few UI elements to our activity entry XML file. First, we're going to add an image view. So, we'll drag that over from the palette. And we're going to select our logo as the resource. Now, let's set up a few constraints. We're going to constrain it to the top of the parent to the left, as well as to the right. Next, I want to add a bit more padding to this. So, I'm going to come over to the constraint widget. And for the very top margin, I'm going to put 64 DP. Great. That gives us just a bit more space. Next, let's add our button. Once again, we'll drag that from our palette. And we're going to have it be placed right underneath the image view. And let's add some constraints. We'll constrain it to the left and right of the parent. And we'll also constrain it to the bottom of…

Contents