Merge "Fixed a crash when changing density with HUN visible" into nyc-dev

This commit is contained in:
Selim Cinek
2016-04-19 02:53:01 +00:00
committed by Android (Google) Code Review

View File

@@ -120,9 +120,8 @@ public class PageIndicator extends ViewGroup {
}
ImageView first = (ImageView) getChildAt(firstIndex);
ImageView second = (ImageView) getChildAt(secondIndex);
if (second == null) {
// Weird state where number of pages must not have propagated yet.
return;
if (first == null || second == null) {
// may happen during reInflation or other weird cases
}
// Lay the two views on top of each other.
second.setTranslationX(first.getX() - second.getX());