reload the viewpager after editing an image

This commit is contained in:
tibbi 2016-12-06 22:13:09 +01:00
parent 6449316f47
commit ae927425aa

View file

@ -180,8 +180,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
if (requestCode == REQUEST_EDIT_IMAGE) { if (requestCode == REQUEST_EDIT_IMAGE) {
if (resultCode == Activity.RESULT_OK && resultData != null) { if (resultCode == Activity.RESULT_OK && resultData != null) {
val adapter = view_pager.adapter as MyPagerAdapter mPos = -1
adapter.updateItems(mPos) reloadViewPager()
} }
} else if (requestCode == REQUEST_SET_WALLPAPER) { } else if (requestCode == REQUEST_SET_WALLPAPER) {
if (resultCode == Activity.RESULT_OK) { if (resultCode == Activity.RESULT_OK) {