I'm having an exception after leaving an activity with gallery and bringing it back in the case activity was destroyed by system while being in background (you can easily reproduce it if you turn on "Don't keep activities" setiing in a Developer options).
EDIT: happens only while recreation takes place after returning to the gallery fragment from a child fragment
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.veinhorn.scrollgalleryview.HackyViewPager.setLocked(boolean)' on a null object reference
at com.veinhorn.scrollgalleryview.ImageFragment.onCreateView(ImageFragment.java:67)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2439)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1460)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
at androidx.fragment.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3229)
at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:201)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:620)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:178)
I'm having an exception after leaving an activity with gallery and bringing it back in the case activity was destroyed by system while being in background (you can easily reproduce it if you turn on "Don't keep activities" setiing in a Developer options). EDIT: happens only while recreation takes place after returning to the gallery fragment from a child fragment