Clarifying one sentence....

On Friday, November 9, 2012 4:52:34 PM UTC-5, AndyD wrote:
>
> I've got a RelativeLayout declared via XML that contains a regular View 
> and a ViewStub.  The regular View specifies 
> android:layout_above="@+id/the_view_stub".  In my Fragment's 
> onCreateView(), I'm first inflating the RelativeView, then conditionally 
> inflating the stub.  However, the result is that the view that replaces the 
> stub upon its inflation is overlaying the "regular" view, instead of being 
> positioned below it.
>
> When I substitute the stub's "target" layout directly into the 
> RelativeLayout in the XML file (i.e. no stub, no conditional inflation), it 
> works as expected.
>
> At first, I thought maybe the problem was that the inflated view that 
> replaced the ViewStub had a different ID than the stub, such that *during 
> the layout calculations*, the first view in the RelativeLayout was still 
> referencing the ID of the stub (which would no longer exist); however, 
> making the IDs of the stub and its target the same, via android:inflatedId, 
> didn't make any difference.
>
> Then, I thought maybe I needed to call requestLayout() on the 
> RelativeLayout after stub inflation, but that didn't make a difference, 
> either.
>
> Ideas?
>

-- 
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

Reply via email to