[android-developers] Dialog & windowBackground style item
hi,
i'd like to create custom Dialog with custom background Drawable.
so i creaded style that defines "windowBackground" item and sets it to
"@drawable/dialog_background":
<style name="CustomDialog" parent="android:Theme.Dialog">
<item name="android:windowBackground">@drawable/dialog_background</
item>
<item name="android:windowNoTitle">true</item>
</style>
dialog_background.xml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/
android">
<item android:drawable="@drawable/dialog_bg"/>
<item android:top="-16px" android:left="-16px" >
<bitmap android:src="@drawable/red_circle" android:gravity="top|
left" />
</item>
</layer-list>
where:
@drawable/dialog_bg is nine patch bitmap that defines dialog's
background
@drawable/red_circle is 32x32 png bitmap that contains simple red
circle with radius of 16px and is
offset on the left and top by 16 pixels so that its center is located
on the position (0, 0)
of my dialog
basically i'd like to get something like this:
*
###
*###*--------------+
### |
* |
| |
+----------------+
but due to clipping to dialog bounds i got:
##*--------------+
## |
* |
| |
+----------------+
my question is if it's possible to avoid Drawable clipping?
if so, how?
i already tried this:
Window w = getWindow();
ViewGroup decor = (ViewGroup) w.getDecorView();
decor.setClipChildren(false);
but it didn't help...
any suggestions?
thanks
pskink
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home