Transparent SurfaceView

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

Transparent SurfaceView

Postby killa.fr0gg » Thu Oct 01, 2009 5:12 am

Hi all!

I'm just trying to have an invisible surface sit on top of the rest of my views for drawing. I can't seem to make any view sit permanently on top of others while having it simultaneously be invisible, even setting the resource to a completely invisible file. Of course, I don't want to just set the View to INVISIBLE, because then I couldn't draw anything visible to it while simultaneously seeing the cool animations behind it. How is this done? I am stumped...

Thank you very much for any assistance.
killa.fr0gg
Junior Developer
Junior Developer
 
Posts: 12
Joined: Tue Apr 21, 2009 9:35 am
Location: Los Angeles

Top

Postby umair » Thu Oct 01, 2009 12:30 pm

If I'm getting your problem right...the solution is simple.

Just add a layout of our choice and set it's background to 'null' (In xml view set background field empty). Do not make it invisible.

Now add thing in this view and you'll see them without any problem.
Muhammad Umair
User avatar
umair
Developer
Developer
 
Posts: 28
Joined: Thu Feb 26, 2009 1:00 pm
Location: Lahore, Pakistan

Postby killa.fr0gg » Thu Oct 01, 2009 7:22 pm

how would I declare that in code vs. xml? I really prefer not to use xml, ever.
killa.fr0gg
Junior Developer
Junior Developer
 
Posts: 12
Joined: Tue Apr 21, 2009 9:35 am
Location: Los Angeles

Postby killa.fr0gg » Thu Oct 01, 2009 10:45 pm

I'm sorry, I just don't understand at all. All I want to do is put an invisible canvas within my framelayout for drawing circles at touchpoints. i can do everything except make an invisible canvas sit within the bounds of a framelayout and handle all the drawing in onTouch(). I have tried overriding my framelayout's onDraw() but to no avail. Why can't I do this?
killa.fr0gg
Junior Developer
Junior Developer
 
Posts: 12
Joined: Tue Apr 21, 2009 9:35 am
Location: Los Angeles

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 9 guests