Overlay over other activity

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Overlay over other activity

Postby Hebus » Mon Apr 27, 2009 3:18 pm

Hello guys, I'm trying to implement a compas activity. The goal is that the compas will always be visible, for example over the google map activity.

I wanted to do this as a notification, but it seems impossible as I can't refresh the image with the compas sensor changes.

So, is it possible to create a transparent overlay wher I will draw my compass (like an "always on top" drawing surface) while the application view that lays just under my overlay will still receive screen touch and key events?

I think it is not possible but if one of you ever did this...

Thanks in advance for your answers
Junior Developer
Junior Developer
Posts: 14
Joined: Wed Apr 15, 2009 1:10 pm


Postby arnouf » Fri May 22, 2009 8:34 pm


If I understand correctly your requirement, try to use an Overlay and add it to your MapActivity using something like that
MapOverlay mapOverlay = new MapOverlay(); // MapOverlay is my component extending of Overlay
List<Overlay> listOfOverlays = mv.getOverlays(); // mv is my MapView object

The overlay class have to implement onDraw() method to display...
Posts: 28
Joined: Mon Jan 21, 2008 9:07 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 2 guests