Loading core/java/android/view/LayoutInflater.java +105 −105 Original line number Diff line number Diff line Loading @@ -911,7 +911,10 @@ public abstract class LayoutInflater { AttributeSet attrs) throws XmlPullParserException, IOException { int type; if (parent instanceof ViewGroup) { if (!(parent instanceof ViewGroup)) { throw new InflateException("<include /> can only be used inside of a ViewGroup"); } // Apply a theme wrapper, if requested. This is sort of a weird // edge case, since developers think the <include> overwrites // values in the AttributeSet of the included View. So, if the Loading Loading @@ -953,7 +956,8 @@ public abstract class LayoutInflater { final String value = attrs.getAttributeValue(null, ATTR_LAYOUT); throw new InflateException("You must specify a valid layout " + "reference. The layout ID " + value + " is not valid."); } else { } final XmlResourceParser childParser = context.getResources().getLayout(layout); try { Loading Loading @@ -1029,10 +1033,6 @@ public abstract class LayoutInflater { } finally { childParser.close(); } } } else { throw new InflateException("<include /> can only be used inside of a ViewGroup"); } LayoutInflater.consumeChildElements(parser); } Loading Loading
core/java/android/view/LayoutInflater.java +105 −105 Original line number Diff line number Diff line Loading @@ -911,7 +911,10 @@ public abstract class LayoutInflater { AttributeSet attrs) throws XmlPullParserException, IOException { int type; if (parent instanceof ViewGroup) { if (!(parent instanceof ViewGroup)) { throw new InflateException("<include /> can only be used inside of a ViewGroup"); } // Apply a theme wrapper, if requested. This is sort of a weird // edge case, since developers think the <include> overwrites // values in the AttributeSet of the included View. So, if the Loading Loading @@ -953,7 +956,8 @@ public abstract class LayoutInflater { final String value = attrs.getAttributeValue(null, ATTR_LAYOUT); throw new InflateException("You must specify a valid layout " + "reference. The layout ID " + value + " is not valid."); } else { } final XmlResourceParser childParser = context.getResources().getLayout(layout); try { Loading Loading @@ -1029,10 +1033,6 @@ public abstract class LayoutInflater { } finally { childParser.close(); } } } else { throw new InflateException("<include /> can only be used inside of a ViewGroup"); } LayoutInflater.consumeChildElements(parser); } Loading