title: How does one create a smaller overlay activity in android eclipse
body: <p>i have successfully created an overlay activity which allows touch input to be sent to the window behind it. Everything works, however, it significantly slows down the device, my guessing is because its creating such a large overlay? I really dont need the overlay to be across the entire area of the screen, it technically could be as big as 2 x 2 pixels. </p>
  
  <p>Here is my code </p>
  
  <pre><code>inflater = LayoutInflater.from(getApplicationContext());
  final WindowManager.LayoutParams params = new  WindowManager.LayoutParams(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT, WindowManager.LayoutParams.FLAG_FULLSCREEN, PixelFormat.TRANSLUCENT);
  
      params.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
      params.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
      params.flags |= WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN;
      //params.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
  
  
      WindowManager wm = (WindowManager) getApplicationContext().getSystemService(WINDOW_SERVICE);
      ViewGroup mTopView = (ViewGroup)inflater.inflate(R.layout.dummy, null);
      getWindow().setAttributes(params);
      mTopView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
      wm.addView(mTopView, params);
  </code></pre>
  
  <p>This dos exactly what i want it to do, but like i said, it noticeably slows down the device. How can i create the overlay but yet retain system performance?</p>