[android-developers] Re: Customizing a RelativeLayout

2010-12-17 Thread Paolo
Thanks for your help anyway ;) I hope someone can answer at my question. On 17 Dic, 09:58, Kostya Vasilyev wrote: > I don't know what setWillNotDraw does, but the XML error looks suspicious. > > -- Kostya > > 17.12.2010 11:49, Paolo пишет: > > > > > > > any ideas? > > > On 16 Dic, 13:40, Paolo  w

Re: [android-developers] Re: Customizing a RelativeLayout

2010-12-17 Thread Kostya Vasilyev
I don't know what setWillNotDraw does, but the XML error looks suspicious. -- Kostya 17.12.2010 11:49, Paolo пишет: any ideas? On 16 Dic, 13:40, Paolo wrote: Thanks a lot for your answer ;) Before to use my own nine-patch, I'd like to understand what I'm wrong extending the RelativeLayout.

[android-developers] Re: Customizing a RelativeLayout

2010-12-17 Thread Paolo
any ideas? On 16 Dic, 13:40, Paolo wrote: > Thanks a lot for your answer ;) > > Before to use my own nine-patch, I'd like to understand what I'm wrong > extending the RelativeLayout. > So, in other topics I found that Roman Guy suggested to use > setWillNotDraw(false).  Using this flag I can show

[android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Paolo
Thanks a lot for your answer ;) Before to use my own nine-patch, I'd like to understand what I'm wrong extending the RelativeLayout. So, in other topics I found that Roman Guy suggested to use setWillNotDraw(false). Using this flag I can show my Custom Layout correctly running on a device (why?),

Re: [android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Kostya Vasilyev
16.12.2010 14:34, Paolo пишет: I've tried, but I don't like that nine-patch. Maybe I should draw end substitute my own nine patch. Anyway in this way I can simply manage it in the Eclipse Layout editor, and that's is good! Yes, you can certainly use other nine-patches from Android (see my prev

[android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Paolo
I've tried, but I don't like that nine-patch. Maybe I should draw end substitute my own nine patch. Anyway in this way I can simply manage it in the Eclipse Layout editor, and that's is good! The only thing I don't like of the nine-patch way is that I have to draw one nine-patch for all the time I

[android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Paolo
Ok I'm going to try it ;) On 16 Dic, 11:31, Kostya Vasilyev wrote: > Paolo, > > Yes, using a nine-patch drawable background is easy, efficient, and > produces great results. > > Try this: open a layout in XML mode and add this attribute: > > android:background="@android:drawable/toast_frame" > >

Re: [android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Kostya Vasilyev
Paolo, Yes, using a nine-patch drawable background is easy, efficient, and produces great results. Try this: open a layout in XML mode and add this attribute: android:background="@android:drawable/toast_frame" Think you'll like it :) -- Kostya 16.12.2010 13:24, Paolo пишет: ah... and usin

[android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Paolo
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 wrote: > Just use android:background with a nine-patch drawable. No need to subclass. > > You can even copy one of Android's n

Re: [android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Kostya Vasilyev
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 ther

[android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread 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 wrote: > Why would you need to extend RelativeLayout just to change the > background? > > On Dec 16, 5:36 pm, Paolo wrote: > > > > > Hi! > > I'm try

[android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Zsolt Vasvari
Why would you need to extend RelativeLayout just to change the background? On Dec 16, 5:36 pm, Paolo 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, bu