Skip to content

Commit

Permalink
Merge pull request #24 from crehmann/master
Browse files Browse the repository at this point in the history
Handle empty ViewPager
  • Loading branch information
laenger authored Jun 7, 2018
2 parents c641bfe + 813d6a2 commit 4b38b9c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,10 @@ View findScrollingChild(View view) {
if (view instanceof ViewPager) {
ViewPager viewPager = (ViewPager) view;
View currentViewPagerChild = ViewPagerUtils.getCurrentView(viewPager);
if (currentViewPagerChild == null) {
return null;
}

View scrollingChild = findScrollingChild(currentViewPagerChild);
if (scrollingChild != null) {
return scrollingChild;
Expand Down

0 comments on commit 4b38b9c

Please sign in to comment.