daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
  2.  
  3.  
  4.     DisplayMetrics displaymetrics = new DisplayMetrics();
  5.     int screenWidth = displaymetrics.widthPixels;
  6.     int screenHeight = displaymetrics.heightPixels;
  7.  
  8.     params = new WindowManager.LayoutParams(
  9.             720, 1280,
  10.             0, 0,
  11.             WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
  12.             WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
  13.                     | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
  14.                     | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
  15.                     | WindowManager.LayoutParams.FLAG_FULLSCREEN,
  16.             PixelFormat.TRANSLUCENT);
  17.  
  18.     mWindowManager.addView(testDrawView, params);
  19.    
  20. class BrRec extends BroadcastReceiver {
  21.     public void onReceive(Context context, Intent intent) {
  22.  
  23.         mHeadLayer.rects.clear();
  24.         mHeadLayer.rects = (ArrayList<Rect>) intent.getSerializableExtra("rects");
  25.  
  26.  
  27.         for (int i = 0; i < mHeadLayer.rects.size(); ++i)
  28.         {
  29.             mHeadLayer.invalidate(mHeadLayer.rects.get(i));
  30.         }
  31.  
  32.         mHeadLayer.invalidate();}}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top