* commit '19f8a686d19c3ba4f994671d9fefc5e9f5dc25b8': Explicitly call onApplyWindowInsets from a listener
This commit is contained in:
@@ -43,6 +43,11 @@ public class MainActivity extends Activity {
|
||||
int colMargin = res.getDimensionPixelOffset(round ?
|
||||
R.dimen.page_column_margin_round : R.dimen.page_column_margin);
|
||||
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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user