am 35b1a50a: Explicitly call onApplyWindowInsets from a listener

* commit '35b1a50abda7476f6c329b922e1b55a26cae5db6':
  Explicitly call onApplyWindowInsets from a listener
This commit is contained in:
Mark Renouf
2014-08-12 20:35:22 +00:00
committed by Android Git Automerger

View File

@@ -43,6 +43,11 @@ public class MainActivity extends Activity {
int colMargin = res.getDimensionPixelOffset(round ? int colMargin = res.getDimensionPixelOffset(round ?
R.dimen.page_column_margin_round : R.dimen.page_column_margin); R.dimen.page_column_margin_round : R.dimen.page_column_margin);
pager.setPageMargins(rowMargin, colMargin); pager.setPageMargins(rowMargin, colMargin);
// GridViewPager relies on insets to properly handle
// layout for round displays. They must be explicitly
// applied since this listener has taken them over.
pager.onApplyWindowInsets(insets);
return insets; return insets;
} }
}); });