overlay

Transparent window in Xwindow parent

戏子无情 提交于 2019-12-10 09:29:22
问题 I am trying to create an overlay window above another running application. Let's say firefox. I implemented by using Xcreatewindow win = XCreateWindow( display, *firefoxwindow, 50, 300, 400, 400, 0, visualinfo.depth, InputOutput, visualinfo.visual, CWColormap|CWEventMask|CWBackPixmap|CWBorderPixel, &attr ) ; I searched *firefoxwindow by using XQueryTree() and then followed this code https://gist.github.com/903479 The result is the transparent window when I use the XRoot as parent. But, when I

draw text on top of bitmap failed

醉酒当歌 提交于 2019-12-10 04:19:24
问题 I want to display a point and a text on top of an image. I have tried several tutorial on overlaying bitmap, but it doesn't seem to work. Here is the code which displays the background image. mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.roomplan); mIV = (ImageView)findViewById(R.id.ImageView01); mIV.setImageBitmap(mBitmap); mIV.invalidate(); btnDraw = (Button)findViewById(R.id.Button01); btnDraw.setOnClickListener(this); Then on the OnClickListener, I define another

how to draw rectange on camera preview in android

不问归期 提交于 2019-12-09 20:19:53
问题 Actually I don't understand how to implement the rectangle on the camera preview. Everything working well, but I don't know the way to put the rectangle border like this link. Please anyone help me. Thanks. 回答1: I suggest you implement your camera preview in a custom SurfaceView and then in your XML you can simply overlay the rectangle, like the accepted answer here: Android: Overlay on Android Camera Preview So add a Java file to your project: public class CapturePreview extends SurfaceView

Render Translucent/Transparent Overlay

旧时模样 提交于 2019-12-09 16:45:38
问题 I need a fast way to draw an overlay on a screen with transparency support. I've done a lot of searching and found one potential solution (which has its own problems) and another solution that does not fit my requirements; specifically transparency support. I'll start with the latter and then touch on the former. Solution 1 Using a borderless form with a TransparencyKey, this is one of the most recommended solutions I've found and the least helpful. This solution works by having a new Form,

how to make a Custom Overlays draggable using google-maps v3

廉价感情. 提交于 2019-12-09 13:54:19
问题 the marker can drag , so the Custom Overlays can drag too , so how to make the Custom Overlays draggable , thanks 回答1: I recently put together a solution on a similar thread that applies greatly to this question as well: Here is the other Stack Overflow Thread Showing how to create a custom overlay in V3 with a draggable object Here is the working example: http://www.johnmick.net/drag-div-v3/ Here is some of the source: http://www.johnmick.net/drag-div-v3/js/main.js To make the Custom Overlay

UIScrollView shifts below navigation and status bar

北慕城南 提交于 2019-12-09 13:37:23
问题 I have view which contains a scrollView. When the view shows up the image appears in full screen (320x480) hiding the status and navigation bar. When I tap the screens - status and navigation bar appears on the screen. But this thing shifts the UIScrollView below the the navigation bar. I want the status and nav bar to show over my scroll view. Like it happens in the photos app. On tapping the image the status and nav bar shows over the scrollView. Below is how I am positioning the view /

Detecting Android screen overlays programmatically

▼魔方 西西 提交于 2019-12-09 10:37:58
问题 Is there a way for an app to: check if there exists screen overlay(s) on top of it, and figure out what package name owns the overlay(s)? I know Android M and above is able to detect screen overlays when in the permissions page and deny permission changes whenever it detects screen overlays, but are developers able to achieve the same things in the app layer? 回答1: You can detect overlays by checking for the MotionEvent.FLAG_WINDOW_IS_OBSCURED flag when the user touches one of your Views.

How to make an overlay with round edges (iPhone SDK)?

风格不统一 提交于 2019-12-09 07:17:44
问题 I've just received a lot of good responses to the question about making overlay views. Is there a way that I can make an overlay view on the iPhone SDK? Another question I have is how to make an overlay view have round edges like in the Skype iPhone app or in the Phone.app. Thanks. 回答1: You can use these helper functions and then mask/clip to the resulting CGPath : http://fabian-kreiser.com/index.php?id=1135350598525812781 Or use view.layer.cornerRadius , as seen in How do I create a round

Android Map Performance poor because of many Overlays?

醉酒当歌 提交于 2019-12-09 07:00:11
问题 I have a map in my android application that shows many markers (~20-50). But the app performs very poor when i try to scroll/zoom (in Google Android Maps i did a sample search for pizza and there were also some 20-50 results found and i didn't notice any particular performance problems when zooming/scrolling through the map). Here is my (pseudo)code: onCreate() { .... drawable = this.getResources().getDrawable(R.drawable.marker1); itemizedOverlay = new MyItemizedOverlay(drawable,mapView); ...

How can I rotate an overlay image on Google Maps?

情到浓时终转凉″ 提交于 2019-12-09 06:28:59
问题 I'm trying to place a series of overlays onto a Google Map. I'm following along with the sample code for ground overlays, but that only allows me to dictate image placement using north/south/east/west boundaries. The works as long as my image is a rectangle and oriented along longitude and latitude lines. I'd really like to be able to accurately place an image, including custom scale and angular orientation. That doesn't seem possible with a ground overlay. So here's a possible use case. I'm