Why is the same dialog sometimes translucent?

by Carl Whalley » Fri, 02 Apr 2010 21:36:41 GMT

Sponsored Links
 I have a Dialog with a Button whos OnClickListener() creates an
public void onClick(View v) {
  Dialog confirmDialog = new AlertDialog.Builder( activity )
                        .setIcon( R.drawable.icon )

The problem is in one place in the app, actually a MapActivity derived
Activity, when I run this the confirmDialog is translucent, and I
don't want this. When I run the same code from various other points in
the app, all non MapActivity derived, the confirmDialog has a solid
background. So its unlikely to be anything in the Dialogs xml but more
the context it is launched from, but I can't for the life of me see
where any translucent style is even mentioned in the app. Has anyone
see this before, or got any hints for how I can stop it happening

Android Academy:  http://androidacademy.com 


Other Threads

1. getPressure and getSize in MotionEvent always return the same value?

This is for a touchscreen application. If I press a finger down and
drag it around, I would expect that getPressure and getSize would give
me a different value as I change how hard I press while dragging.
However, both of these methods always return the initial value from
the first MotionEvent that I get in my handler. In other words,
whatever value is returned from getPressure on the first MotionEvent
that has ACTION_DOWN, I get that same value for every subsequent
ACTION_MOVE event all the way through to the final ACTION_UP event.
The same is true for getSize. If I'm actually changing how hard I
press on the screen as I drag my finger around, I want to get changing
values from getPressure. Is this possible? Am I missing something?

This is on a Motorola Droid.

I tried using the Pointer Location application and it also shows the
same behavior, the initial value from getPressure is the value I get
for all subsequent values from getPressure while the finger remains
down. Thanks for your help.

- dave


2. button.setheight not working ?

Hi all,

Can anybody please confirm, that button.setHeight and button.setWidth
is not changing the height and width of buttons at the run time ? I am
using android 1.5



3. How to fetch Mobile Number

4. Random phone restarts, anyone else experience this?

5. Got exception when using MediaRecorder.AudioSource.VOICE_CALL

6. possible to remove a linearlayout ?

7. "On Android nobody is maki ng significant revenue.鈥???