27.04.2011 17:50, Streets Of Boston ?????:
I don't think you can draw an 'inverse' rectangle like that using
shape drawables.
Why not?
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="4dp" />
<padding
android:left="6dp"
android:right="6dp"
android:top="6dp"
android:bottom="6dp" />
*<solid
android:color="@android:color/transparent" />*
<stroke
android:width="4dp"
android:color="#FF00FF40 />
</shape>
A subclass of Shape would work well too - I agree with Streets and
Daniel - here is the source for RectShape, it's only 60 lines, over 20
of which are comments:
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/graphics/drawable/shapes/RectShape.java#RectShape
-- Kostya
For a good overview of what you can use for drawables go
here: http://www.idunnolol.com/android/drawables.html
I agree with Daniel: Use a 9patch drawable or do it programmatically,
creating your own Drawable subclass and making this your 'frame'.
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
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