Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
- DisplayMetrics displaymetrics = new DisplayMetrics();
- int screenWidth = displaymetrics.widthPixels;
- int screenHeight = displaymetrics.heightPixels;
- params = new WindowManager.LayoutParams(
- 720, 1280,
- 0, 0,
- WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
- WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
- | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
- | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
- | WindowManager.LayoutParams.FLAG_FULLSCREEN,
- PixelFormat.TRANSLUCENT);
- mWindowManager.addView(testDrawView, params);
- class BrRec extends BroadcastReceiver {
- public void onReceive(Context context, Intent intent) {
- mHeadLayer.rects.clear();
- mHeadLayer.rects = (ArrayList<Rect>) intent.getSerializableExtra("rects");
- for (int i = 0; i < mHeadLayer.rects.size(); ++i)
- {
- mHeadLayer.invalidate(mHeadLayer.rects.get(i));
- }
- mHeadLayer.invalidate();}}
Add Comment
Please, Sign In to add comment