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.

Add binding with RxJava, part 2

Add binding with RxJava, part 2 - Android Tutorial

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

Start my 1-month free trial

Add binding with RxJava, part 2

- [Instructor] We're now ready to take those changes, and apply them to our list view, and we'll begin by clicking on the adapter, and making some changes within here. First we're not going to pass in a list of spies anymore to work with instead we'll just initialize it here, and say it's equal to an new array list, and we'll provide a way for people to set that down below. I'll say public void, set spies, and we'll just give it a new list of spyDTOs, and we'll call this spies. We'll set it, is equal to spies, and then we'll also notify that the dataset was changed, and that's all the changes we needed within that layer. In the next layer, it's going to the presenter. We're going to add a couple of methods within here. We'll also refactor this to remove this first argument cause we're no longer going to be passing a block to trigger, but we'll handle that within the subscriber instead. So we'll say void add New Spy, and this is just for the activity to trigger to the presenter and say…

Contents