am 98b567b5: am 19f8a686: am 35b1a50a: Explicitly call onApplyWindowInsets from a listener

* commit '98b567b59730c6503a75497802ccdd818bd05632':
  Explicitly call onApplyWindowInsets from a listener
This commit is contained in:
Mark Renouf
2014-08-12 20:48:52 +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;
} }
}); });