From the course: Android App Development: Design Patterns for Mobile Architecture

Unlock the full course today

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

Create presenter, part 3

Create presenter, part 3 - Android Tutorial

From the course: Android App Development: Design Patterns for Mobile Architecture

Start my 1-month free trial

Create presenter, part 3

- [Instructor] We are now going to convert the secret details activity over to the MBP Architecture. We're going to do what we did with the rest of these activities which is we're going to move everything over to a presenter. So the first thing we're going to do is get rid of these objects and we'll move those down into the presenter. We'll say we're going to make a SecretDetailsPresenter presenter;, make this class. I'll just paste those in here for right now. And just like the others we're going to rename this method to attachUI(); and we're going to put something else in here. We'll say it's a private void configure(). And this is just going to set up the UI according to when we get a SecretDetailsPresenter. We'll say this.presenter = presenter;. And then we're going to move some of this logic, this crack password logic into that actual presenter. I'll go ahead and do that, okay, we'll just put a bookmark here, Command, Shift, 2 and we'll have one in here, Command, Shift, 1, we…

Contents