declare viewpager as nullable

This commit is contained in:
tibbi 2017-02-15 02:26:31 +01:00
parent 60cc462c6e
commit a17e0f7a39

View file

@ -147,7 +147,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
private fun updatePagerItems() {
val pagerAdapter = MyPagerAdapter(this, supportFragmentManager, mMedia)
view_pager.apply {
view_pager?.apply {
adapter = pagerAdapter
currentItem = mPos
addOnPageChangeListener(this@ViewPagerActivity)