The way I go about this is to use a theme such as -

<style name="ModifiedDialog" parent="android:Theme.Dialog">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@color/transparent</item>
</style>

Setting windowNoTitle prevents the dialog title from being displayed.
 Setting windowBackground to transparent stops the white border from being
displayed around the dialog.  Transparent is set in my colours.xml file as -

<color name="transparent">#00000000</color>

Then in your manifest file set the theme for your activity to
@style/ModifiedDialog

Regards,

Cliff Davies


On Fri, Mar 25, 2011 at 8:28 AM, Deepak Kumar <[email protected]>wrote:

> Hi All,
>
>                I am creating one login screen that should have to appear at
> the center of the screen(smaller in size as compared to actual device size
> *eg*:150*150 for dev size 320*480) .It will look something like alert
> dialog that have options for username textview & passwd textview & 2
> buttons.
>
>                But now I am using an activity & if I will give value for
> height & width as 150dip instead of fill_parent then it will reduce the size
> but I can't see the part of previous background activity screen & that area
> will appear as black.
>
>                So,anyone can tell me what alternative I have to use? Or how
> to do this?
>
>
>      Thanks,
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to