Static method to help inflate parent view with layoutId

@param inflater inflater
@param parent   parent
@param layoutId layoutId
@return View
321503
public static View inflateView(LayoutInflater inflater, ViewGroup parent, int layoutId) {
        return inflater.inflate(layoutId, parent, false);
    }
90536
private void inflateTitleView() {
        titleContainer = rootView.findViewById(R.id.title_container);
        titleContainer.removeAllViews();

        if (customTitleView != null) {
            titleContainer.addView(customTitleView);
        } else if (customTitleViewId != -1) {
            LayoutInflater layoutInflater = LayoutInflater.from(getContext());
            View view = layoutInflater.inflate(customTitleViewId, titleContainer, false);
            titleContainer.addView(view);
        } else {
            LayoutInflater layoutInflater = LayoutInflater.from(getContext());
            View view = layoutInflater.inflate(R.layout.bottom_sheet_title, titleContainer, false);
            titleContainer.addView(view);
        }

        if (getStyle() == Style.LIST) {
            int padding = getContext().getResources()
                    .getDimensionPixelSize(R.dimen.bottom_sheet_list_item_horizontal_padding);
            titleContainer.setPadding(padding, 0, padding, 0);
        } else {
            int padding = getContext().getResources()
                    .getDimensionPixelSize(R.dimen.bottom_sheet_grid_item_horizontal_padding);
            titleContainer.setPadding(padding, 0, padding, 0);
        }

        View titleView = titleContainer.findViewById(android.R.id.title);
        titleTextView = titleView instanceof TextView ? (TextView) titleView : null;
    }
916046
private View inflateButtonBar() {
        ViewGroup rootView = getRootView();

        if (rootView != null) {
            LayoutInflater layoutInflater = LayoutInflater.from(getContext());
            buttonBarContainer = (ViewGroup) layoutInflater
                    .inflate(R.layout.button_bar_container, rootView, false);
            buttonBarDivider = buttonBarContainer.findViewById(R.id.button_bar_divider);
            rootView.addView(buttonBarContainer);
            View view = layoutInflater
                    .inflate(R.layout.horizontal_button_bar, buttonBarContainer, false);
            buttonBarContainer.addView(view);
            nextButton = view.findViewById(android.R.id.button1);
            finishButton = view.findViewById(android.R.id.button2);
            backButton = view.findViewById(android.R.id.button3);
            return buttonBarContainer;
        }

        return null;
    }
823963
public void setContentView(int layoutResId) {
        LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
        View contentView = layoutInflater.inflate(layoutResId, null);
        setContentView(contentView);
    }
1301554
private void createView(Context context) {
        ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.pin_view, this,
                true);
        inputMethodManager = (InputMethodManager) getContext().getSystemService(Service.INPUT_METHOD_SERVICE);
        mLinearLayoutPinTexts = (LinearLayout) findViewById(R.id.ll_pin_texts);
        mLinearLayoutPinBoxes = (LinearLayout) findViewById(R.id.ll_pin_edit_texts);
    }
1041949
public static void saveLayout(Layout layout, LayoutIdentifier layoutId, boolean hideScope,
                                  IResponseCallback<LayoutIdentifier> callback) {
        LayoutPrompt.show(layoutId, hideScope, true, CAP_LAYOUT_SAVE, MSG_LAYOUT_SAVE, (event) -> {
            LayoutIdentifier id = event.getTarget().getAttribute("layoutId", LayoutIdentifier.class);
            
            if (id != null) {
                layout.saveToProperty(id);
                
                if (callback != null) {
                    callback.onComplete(id);
                }
            }
            
        }
986813
private void inflateListView(@NonNull final ViewGroup contentContainer) {
        View listView = contentContainer.findViewById(android.R.id.list);
        this.listView = listView instanceof RecyclerView ? (RecyclerView) listView : null;

        if (this.listView == null && !getDialog().isCustomViewUsed()) {
            LayoutInflater layoutInflater = LayoutInflater.from(getContext());
            View view = layoutInflater
                    .inflate(R.layout.material_dialog_list_view, contentContainer, false);
            this.listView = view.findViewById(android.R.id.list);
            getDialog().setView(view);
            this.inflatedCustomView = true;
        } else {
            this.inflatedCustomView = false;
        }

        View divider = contentContainer.findViewById(R.id.list_divider);
        this.listDivider = divider instanceof Divider ? (Divider) divider : null;
    }
117949
public void addScreenButtons(Container parent)
    {
        GridBagLayout gridbag = (GridBagLayout)this.getScreenLayout();
        GridBagConstraints c = this.getGBConstraints();
        c.gridheight = GridBagConstraints.REMAINDER; // end row
        c.anchor = GridBagConstraints.NORTH;
        c.gridwidth = 1; // end column
        ImageIcon icon = BaseApplet.getSharedInstance().loadImageIcon(Constants.SUBMIT);
        JButton button = new JButton(Constants.SUBMIT, icon);
        button.setOpaque(false);
        button.setName(Constants.SUBMIT);
        gridbag.setConstraints(button, c);
        parent.add(button);
        button.addActionListener(this);
        c.gridx = 3;                            // Column 1
        c.gridheight = GridBagConstraints.REMAINDER; // end row
        c.anchor = GridBagConstraints.NORTH;
        icon = BaseApplet.getSharedInstance().loadImageIcon(Constants.RESET);
        button = new JButton(Constants.RESET, icon);
        button.setOpaque(false);
        button.setName(Constants.RESET);
        gridbag.setConstraints(button, c);
        parent.add(button);
        c.gridheight = 1; //Set back
        button.addActionListener(this);
    }
867911
public void show(ViewGroup parent, boolean usePhoneLayout) {
        MarginLayoutParams params = init(parent.getContext(), null, parent, usePhoneLayout);
        updateLayoutParamsMargins(null, params);
        showInternal(null, params, parent);
    }
746032
@UiThread
    protected void parentCollapsedFromViewHolder(int flatParentPosition) {
        ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition);
        updateCollapsedParent(parentWrapper, flatParentPosition, true);
    }
151586
@UiThread
    public void collapseParent(@NonNull P parent) {
        ExpandableWrapper<P, C> parentWrapper = new ExpandableWrapper<>(parent);
        int flatParentPosition = mFlatItemList.indexOf(parentWrapper);
        if (flatParentPosition == INVALID_FLAT_POSITION) {
            return;
        }

        collapseViews(mFlatItemList.get(flatParentPosition), flatParentPosition);
    }
439014
@Override
    public String setLayoutAttribute(String nodeId, String name, String value) {
        Validate.notEmpty(nodeId, "nodeId cannot be null");
        Validate.notEmpty(name, "name cannot be null");
        Validate.notEmpty(value, "value cannot be null");

        final LayoutNodeAttributesImpl layoutAttribute = getLayoutNodeAttributes(nodeId, true);
        final Map<String, String> attributes = layoutAttribute.getAttributes();
        return attributes.put(name, value);
    }
565429
@UiThread
    protected void parentExpandedFromViewHolder(int flatParentPosition) {
        ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition);
        updateExpandedParent(parentWrapper, flatParentPosition, true);
    }
1098258
private void inflate() {
        inflate(getContext(), R.layout.toolbar_large, this);
        this.backgroundView = findViewById(R.id.toolbar_background_view);
        this.toolbar = findViewById(R.id.navigation_toolbar);
        RelativeLayout.LayoutParams layoutParams =
                (RelativeLayout.LayoutParams) toolbar.getLayoutParams();
        this.navigationWidth = layoutParams.width;
    }
46219
public void createPartControl(Composite parent) {
		viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
		viewer.setContentProvider(new ViewContentProvider());
		viewer.setLabelProvider(new ViewLabelProvider());
		viewer.setInput(createDummyModel());
	}
1199688
def init_layout(self):
        
        super(AndroidViewGroup, self).init_layout()
        widget = self.widget
        i = 0
        for child in self.children():
            child_widget = child.widget
            if child_widget:
                if child.layout_params:
                    widget.addView_(child_widget, i,
                                             child.layout_params)
                else:
                    widget.addView(child_widget, i)
                i += 1

        # Force layout using the default params
        if not self.layout_params:
            self.set_layout({})
185191
public BottomSheetDialog contentView(int layoutId){
        if(layoutId == 0)
            return this;

        View v = LayoutInflater.from(getContext()).inflate(layoutId, null);
        return contentView(v);
    }