Merge "Allow null child view when checking whether divider should draw" into mnc-dev

This commit is contained in:
Doris Liu
2015-06-30 21:34:58 +00:00
committed by Android (Google) Code Review

View File

@@ -659,7 +659,8 @@ public class LinearLayout extends ViewGroup {
*/
private boolean allViewsAreGoneBefore(int childIndex) {
for (int i = childIndex - 1; i >= 0; i--) {
if (getVirtualChildAt(i).getVisibility() != GONE) {
View child = getVirtualChildAt(i);
if (child != null && child.getVisibility() != GONE) {
return false;
}
}