Code example for WindowManager.LayoutParams

Methods: copyFrom

0
 
    /** 
     * @return A copy of the current layout parameters. 
     */ 
    public LayoutParams getParams() {
        final LayoutParams copy = new LayoutParams();
        copy.copyFrom(mParams);
        return copy;
    } 
 
    /** 
     * Sets the current layout parameters and applies them immediately. 
     * 
     * @param params The layout parameters to use. 
     */ 
    public void setParams(LayoutParams params) {
        mParams.copyFrom(params);
 
        if (mVisible) {
            mWindowManager.updateViewLayout(mContentView, mParams);
        }