O'Reilly logo

Android Development with Kotlin by Igor Wojda, Marcin Moskala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Putting it all together

We have MainPresenter ready to be used in the project. Now we need to use it in MainActivity:

package com.sample.marvelgallery.view.main import android.os.Bundle import android.support.v7.widget.GridLayoutManager import android.view.Window import com.sample.marvelgallery.R import com.sample.marvelgallery.data.MarvelRepository import com.sample.marvelgallery.model.MarvelCharacter import com.sample.marvelgallery.presenter.MainPresenter import com.sample.marvelgallery.view.common.BaseActivityWithPresenter import com.sample.marvelgallery.view.common.bindToSwipeRefresh import com.sample.marvelgallery.view.common.toast import kotlinx.android.synthetic.main.activity_main.* class MainActivity : BaseActivityWithPresenter(), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required