Adding check before we try and remove associated holographic icons (in the case there are none generated).

Change-Id: If06693f7218c3388c3ba6481a07655ed7386391d
This commit is contained in:
Winson Chung
2011-05-16 16:28:53 -07:00
parent 1c29b18e28
commit b3715fe227

View File

@@ -169,7 +169,11 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
@Override
public void removeViewOnPageAt(int index) {
mChildren.removeViewAt(index);
mHolographicChildren.removeViewAt(index);
// Holographic icons are disabled in certain cases (on lower hardware, or if there is only
// one page), so check before we try and remove the view at a specified index.
if (mHolographicChildren.getChildAt(index) != null) {
mHolographicChildren.removeViewAt(index);
}
}
@Override