Thursday, December 16, 2010

[android-developers] Re: Customizing a RelativeLayout

ah... and using nine-patch drawable is better than the way I'm
following? Why should I prefer this way? I'm asking just to
understand :)

On 16 Dic, 11:16, Kostya Vasilyev <kmans...@gmail.com> wrote:
> Just use android:background with a nine-patch drawable. No need to subclass.
>
> You can even copy one of Android's nine-patch backgrounds into your project.
>
> Take a look inside the Android SDK directory, then
> platforms\android-X\data\res\drawable-mdpi (-hdpi).
>
> There are some very nice one in there, in particular toast_frame.9.png,
> zoom_plate, panel_background, etc.
>
> -- Kostya
>
> 16.12.2010 13:03, Paolo пишет:
>
>
>
>
>
> > Because I'd like to draw something similar to this.
> >http://pocketjourney.files.wordpress.com/2008/03/goal.gif?w=500
>
> > On 16 Dic, 10:53, Zsolt Vasvari<zvasv...@gmail.com>  wrote:
> >> Why would you need to extend RelativeLayout just to change the
> >> background?
>
> >> On Dec 16, 5:36 pm, Paolo<brand...@gmail.com>  wrote:
>
> >>> Hi!
> >>> I'm trying to customize a RelativeLayout on order to show a nice
> >>> trasparent black content box. So my class has extended RelativeLayout
> >>> and has overridden the onDraw() method, but nothing appears in the
> >>> Eclipse layout editor; the same happens if I try to run my app on the
> >>> device.
> >>> I read I have to override dispatchDraw() and this works. I can see my
> >>> custom layout in the editor, but I'm not able to add child view to the
> >>> layout. Or better... I add a child in my layout from XML, but I can't
> >>> see it on the Eclipse layout editor. In this case if I run the app on
> >>> the device I see my layout drawn not correctly.. only a part of it is
> >>> drawn or it appears cut.
> >>> Why? What am I wrong?
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget --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 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


Real Estate