Example usage for android.view ViewManager addView

List of usage examples for android.view ViewManager addView

Introduction

In this page you can find the example usage for android.view ViewManager addView.

Prototype

public void addView(View view, ViewGroup.LayoutParams params);

Source Link

Document

Assign the passed LayoutParams to the passed View and add the view to the window.

Usage

From source file:android.app.Activity.java

void makeVisible() {
    if (!mWindowAdded) {
        ViewManager wm = getWindowManager();
        wm.addView(mDecor, getWindow().getAttributes());
        mWindowAdded = true;/*from   ww w. j av a  2 s .com*/
    }
    mDecor.setVisibility(View.VISIBLE);
}