Advertisement
Guest User

Untitled

a guest
Jul 12th, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
  2. WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.TYPE_u_wish, flag, PixelFormat.*);
  3. windowManager.addView(view, layoutParams);
  4.  
  5. windowManager.removeView(view);
  6.  
  7. WindowManager windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
  8.  
  9. LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
  10.  
  11. TextView view = (View) inflater.inflate(R.layout.activity_main, null);
  12. view.setText(your_clipboard_text);
  13. view.setBackgroundColor(Color.WHITE);
  14.  
  15. WindowManager.LayoutParams params = new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.TYPE_PHONE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.TRANSLUCENT);
  16.  
  17. windowManager.addView(view, params);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement