Code example for FrameLayout

Methods: inflateremoveAllViews

0
    private int dpToPx(int dp) {
        return (int) (getResources().getDisplayMetrics().density * dp + 0.5f);
    } 
 
    public void setLeftPaneLayout(int layoutId) {
        mLeftPane.removeAllViews();
        LayoutInflater.from(getContext()).inflate(layoutId, mLeftPane);
    } 
 
    public void setMiddlePaneLayout(int layoutId) {
        mMiddlePane.removeAllViews();
        LayoutInflater.from(getContext()).inflate(layoutId, mMiddlePane);
    } 
 
    public void setRightPaneLayout(int layoutId) {
        mRightPane.removeAllViews();
        LayoutInflater.from(getContext()).inflate(layoutId, mRightPane);
    } 
 
    public void showLeftPane() { 
        showLeftPane(true);