widgets not visible after drawing bitmaps... (strange..)

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

widgets not visible after drawing bitmaps... (strange..)

Postby JJ » Fri Dec 05, 2008 2:17 pm

Hi all

I am porting an application that I did for the sdk 3 to the last one,
and one of the problems that I am facing is:
some of the widgets that I have, which are created in the following
way:

void init()
{
//create a button
myButton = (Button) findViewById(R.id.myLogon);
myButton.setVisibility(android.widget.Button.VISIBLE);

//create a drawable
background=myContext.getResources().getDrawable
(R.drawable.background);

}

are drawing underneath the bitmaps that I draw in the method onDraw:
void onDraw(Canvas canvas)
{
background.setBounds(0, 0,screenWidth/2, screenHeight/2);
background.draw(canvas);

invalidate();

}

I mean, I can see the background, occupying a quarter of the screen,
and underneath it, the Button.
in previous versions, the widgets were always on top.
Does anybody know how to fix this?

Thanks
JJ
Developer
Developer
 
Posts: 35
Joined: Tue May 13, 2008 1:18 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests