From the course: Android Development Essential Training: 3 Navigation
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Display a button on the toolbar - Android Tutorial
From the course: Android Development Essential Training: 3 Navigation
Display a button on the toolbar
- [Instructor] If you recall there are two types of intents, explicit and implicit. We've already seen how we can use an explicit intent to start a new activity inside of our own application. Now, let's prepare our app for using an implicit intent. This will allow us to make a request to an external application. The first thing we want to do is expose a user interface element that will trigger the intent. We'll do this by adding a menu item to our main activities toolbar. For this, we'll need a new vector asset and we'll add that to our application. We can access the Vector tool by right clicking on our app module and then navigating to new Vector Asset. We're going to use clip art and let's choose something that's existing from Android studio. We're going to click on this shopping cart and let's type into the search bar, Share. In there, shows us a bunch of different share icons that we can choose from. We'll…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.