Code example for LinearLayout.LayoutParams

	public void onCreate() { 
		// create linear layout 
		touchLayout = new LinearLayout(this);
		// set layout width 30 px and height is equal to full screen 
		LayoutParams lp = new LayoutParams(30, LayoutParams.MATCH_PARENT);
		// set color if you want layout visible on screen 
//		touchLayout.setBackgroundColor(Color.CYAN);  
		// set on touch listener 
		// fetch window manager object  
		 mWindowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
		 // set layout parameter of window manager 
		 WindowManager.LayoutParams mParams = new WindowManager.LayoutParams(
	        		30, // width of layout 30 px 
	        		WindowManager.LayoutParams.MATCH_PARENT, // height is equal to full screen
	                WindowManager.LayoutParams.TYPE_PHONE, // Type Ohone, These are non-application windows providing user interaction with the phone (in particular incoming calls).
	                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, // this window won't ever get key input focus  
Stop searching for code, let great code find you!  Add Codota to your java IDE