But we need to move the floating window and for that I am adding the touch listner for the Linear Layout. This will create a window and will show that window in the screen on clicking in the button of the Activity. windowManager.addView(linearLayout, params).final WindowManager.LayoutParams params = new WindowManager.LayoutParams(400,150,_PHONE,_NOT_FOCUSABLE, PixelFormat.TRANSLUCENT).LinearLayout.LayoutParams layoutParamsText = new LinearLayout.LayoutParams(_PARENT,_PARENT) In this tutorial, you will use Microsoft’s Surface Duo 2 emulator to run the demo project.tGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL).TextView textView = new TextView(this).LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(_PARENT,_PARENT).windowManager = (WindowManager) getSystemService(WINDOW_SERVICE).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |