Lines Matching refs:root

270      * @param root Optional view to be the parent of the generated hierarchy.
271 * @return The root View of the inflated hierarchy. If root was supplied,
272 * this is the root View; otherwise it is the root of the inflated
275 public View inflate(int resource, ViewGroup root) {
276 return inflate(resource, root, root != null);
290 * @param root Optional view to be the parent of the generated hierarchy.
291 * @return The root View of the inflated hierarchy. If root was supplied,
292 * this is the root View; otherwise it is the root of the inflated
295 public View inflate(XmlPullParser parser, ViewGroup root) {
296 return inflate(parser, root, root != null);
305 * @param root Optional view to be the parent of the generated hierarchy (if
307 * provides a set of LayoutParams values for root of the returned
310 * the root parameter? If false, root is only used to create the
311 * correct subclass of LayoutParams for the root view in the XML.
312 * @return The root View of the inflated hierarchy. If root was supplied and
313 * attachToRoot is true, this is root; otherwise it is the root of
316 public View inflate(int resource, ViewGroup root, boolean attachToRoot) {
320 return inflate(parser, root, attachToRoot);
337 * @param root Optional view to be the parent of the generated hierarchy (if
339 * provides a set of LayoutParams values for root of the returned
342 * the root parameter? If false, root is only used to create the
343 * correct subclass of LayoutParams for the root view in the XML.
344 * @return The root View of the inflated hierarchy. If root was supplied and
345 * attachToRoot is true, this is root; otherwise it is the root of
348 public View inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot) {
353 View result = root;
356 // Look for the root node.
372 System.out.println("Creating root view: "
378 if (root == null || !attachToRoot) {
380 + "ViewGroup root and attachToRoot=true");
383 rInflate(parser, root, attrs);
385 // Temp is the root view that was found in the xml
390 if (root != null) {
392 System.out.println("Creating params from root: " +
393 root);
395 // Create layout params that match root, if supplied
396 params = root.generateLayoutParams(attrs);
414 // to root. Do that now.
415 if (root != null && attachToRoot) {
416 root.addView(temp, params);
419 // Decide whether to return the root that was passed in or the
421 if (root == null || !attachToRoot) {
617 throw new InflateException("<include /> cannot be the root element");
621 throw new InflateException("<merge /> must be the root element");