cool, that makes sense, thanks Mark Let me know when your book becomes available. I'd be interested on more Android documentation.
On Jun 8, 5:01 pm, Mark Murphy <[EMAIL PROTECTED]> wrote: > darren wrote: > > I see that a lot of the attributes are listed in the cless reference > > documents, but there are still many i cant find info about. For > > example, this page about Buttons: > >http://code.google.com/android/reference/android/widget/Button.html > > > has no info about any of these xml attributes which are valid: > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > android:layout_below="@id/yourStatsButton" > > android:layout_alignParentRight="true" > > android:layout_marginTop="25px" > > android:layout_marginRight="100px" > > Hopefully a Googler will correct the mess I may make with this reply... > > Any time you see an attribute in layout XML that begins with > android:layout_, ignore the widget class (in your case, Button). Those > attributes are layout parameters (hence, the layout_ prefix) and they > are documented on the container class, not on the widget class. > > Your list of attributes shown above appears to be from a widget that is > a child of a RelativeLayout. If you look at the > RelativeLayout.LayoutParams documentation: > > http://tinyurl.com/2bsw97 > > You will see that: > > -- android:layout_below and android:layout_alignParentRight belong to > RelativeLayout.LayoutParams > -- android:layout_marginTop and android:layout_marginRight belong to the > ViewGroup.MarginLayoutParams superclass > -- android:layout_width and android:layout_height belong to the > ViewGroup.LayoutParams superclass > > Layout XML attributes that do not begin with android:layout_ are > (usually) attributes of the widget itself and should be documented on > the widget class or one of its superclasses. > > I've made a note to add an appendix to my book that maps out what all > these layout XML attributes belong to. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > Android Training on the Ranch in September!http://www.bignerdranch.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

