Yep: a child with alignParentRight / alignParentBottom will cause the
parent (the RelativeLayout) to stretch to the entire width / height of
*its* parent.

-- K


2014-05-11 17:05 GMT+04:00 Piren <gpi...@gmail.com>:

> I've come across something like that before. RelativeLayouts do not like
> their children doing something like that (or asking to be aligned to the
> right/bottom).
>
> Just use a size variable for both the parent and child (see
> dimensions.xml), will save you the headache understanding android's layout
> mechanism.
>
>
> On Sunday, May 11, 2014 3:37:09 PM UTC+3, dashman wrote:
>>
>>         android:layout_alignParentLeft="true"
>>         android:layout_alignParentRight="true"
>>
>>
>> No changes - still the full width of the parent View (not layout)
>>
>>
>>
>> On Saturday, May 10, 2014 9:06:10 PM UTC-4, TreKing wrote:
>>>
>>>
>>> On Sat, May 10, 2014 at 6:57 PM, dashman <erjd...@gmail.com> wrote:
>>>
>>>> Shouldn't the width of the button be 60dp -
>>>> since i've set the width of the button to match-parent - and it's set
>>>> to 60dp in the layout.
>>>>
>>>> It's actually taking up the full width of the parent view - not layout.
>>>>
>>>
>>> You'd think, right?
>>>
>>> To achieve what you're looking for, try setting both align_parentLeft
>>> and align_parentRight
>>>
>>> ------------------------------------------------------------
>>> -------------------------------------
>>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
>>> transit tracking app for Android-powered devices
>>>
>>  --
> 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+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to