Example usage for android.view WindowManager.LayoutParams WindowManager.LayoutParams

List of usage examples for android.view WindowManager.LayoutParams WindowManager.LayoutParams

Introduction

In this page you can find the example usage for android.view WindowManager.LayoutParams WindowManager.LayoutParams.

Prototype

public LayoutParams(int w, int h, int _type, int _flags, int _format) 

Source Link

Usage

From source file:com.readystatesoftware.ghostlog.ServerlessLogScreen.java

private void createSystemWindow(Activity activity) {
    final WindowManager.LayoutParams lp = new WindowManager.LayoutParams(viewWidth, viewHeight, 0,
            WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
            PixelFormat.TRANSLUCENT);/*from   w w w.  j av a2s.c  om*/
    lp.gravity = viewGravity;

    setSystemViewBackground(mPrefs.getInt(getString(R.string.pref_bg_opacity), 0));
    mLogBuffer = new LinkedList<LogLine>();
    mLogBufferFiltered = new LinkedList<LogLine>();
    mAdapter = new LogAdapter(mContext, mLogBufferFiltered, TAG);
    mLogListView.setAdapter(mAdapter);
    activity.getWindowManager().addView(mLogListView, lp);
}