Created
January 16, 2019 02:02
-
-
Save navi25/d7c6789991594a72017eba288da0a72b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MovieActivity : AppCompatActivity(){ | |
private lateinit var tmdbViewModel: TmdbViewModel | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_movie) | |
tmdbViewModel = ViewModelProviders.of(this).get(TmdbViewModel::class.java) | |
tmdbViewModel.fetchMovies() | |
tmdbViewModel.popularMovies.observe(this, Observer { | |
//TODO - Your Update UI Logic | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment