Lines Matching defs:root

368      * @param root Optional view to be the parent of the generated hierarchy.
369 * @return The root View of the inflated hierarchy. If root was supplied,
370 * this is the root View; otherwise it is the root of the inflated
373 public View inflate(@LayoutRes int resource, @Nullable ViewGroup root) {
374 return inflate(resource, root, root != null);
388 * @param root Optional view to be the parent of the generated hierarchy.
389 * @return The root View of the inflated hierarchy. If root was supplied,
390 * this is the root View; otherwise it is the root of the inflated
393 public View inflate(XmlPullParser parser, @Nullable ViewGroup root) {
394 return inflate(parser, root, root != null);
403 * @param root Optional view to be the parent of the generated hierarchy (if
405 * provides a set of LayoutParams values for root of the returned
408 * the root parameter? If false, root is only used to create the
409 * correct subclass of LayoutParams for the root view in the XML.
410 * @return The root View of the inflated hierarchy. If root was supplied and
411 * attachToRoot is true, this is root; otherwise it is the root of
414 public View inflate(@LayoutRes int resource, @Nullable ViewGroup root, boolean attachToRoot) {
423 return inflate(parser, root, attachToRoot);
440 * @param root Optional view to be the parent of the generated hierarchy (if
442 * provides a set of LayoutParams values for root of the returned
445 * the root parameter? If false, root is only used to create the
446 * correct subclass of LayoutParams for the root view in the XML.
447 * @return The root View of the inflated hierarchy. If root was supplied and
448 * attachToRoot is true, this is root; otherwise it is the root of
451 public View inflate(XmlPullParser parser, @Nullable ViewGroup root, boolean attachToRoot) {
459 View result = root;
462 // Look for the root node.
478 System.out.println("Creating root view: "
484 if (root == null || !attachToRoot) {
486 + "ViewGroup root and attachToRoot=true");
489 rInflate(parser, root, inflaterContext, attrs, false);
491 // Temp is the root view that was found in the xml
492 final View temp = createViewFromTag(root, name, inflaterContext, attrs);
496 if (root != null) {
498 System.out.println("Creating params from root: " +
499 root);
501 // Create layout params that match root, if supplied
502 params = root.generateLayoutParams(attrs);
522 // to root. Do that now.
523 if (root != null && attachToRoot) {
524 root.addView(temp, params);
527 // Decide whether to return the root that was passed in or the
529 if (root == null || !attachToRoot) {
790 * Recursive method used to inflate internal (non-root) children. This
829 throw new InflateException("<include /> cannot be the root element");
833 throw new InflateException("<merge /> must be the root element");