Includes are indeed resolved at runtime (when the XML layout file is inflated.)

On Thu, Dec 17, 2009 at 1:13 AM, rflexor <[email protected]> wrote:
> Hi,
>
> I have a complex dialog-layout that has to be customized for small
> screens to decrease its height on such devices. This can easily be
> achieved by decreasing the height of several single Buttons and
> Textfields in the layout, each by a small amount.
>
> Of course much of the layout still stays the same, so I figured I
> could use the <include/>-tag. This was the idea:
>
> /res/layout/dialog_layout.xml                        ==> includes
> "@layout/include_button_layout"
> /res/layout/include_button_layout.xml
> /res/layout-small/include_button_layout.xml
>
> I figured that android would choose which button-layout to include at
> runtime. I couldn't get it to run, so I guess I was wrong. Could
> anyone confirm that this is not how it works?
>
> And if so, can anyone confirm whether this is the way to do it?
>
> /res/layout/dialog_layout.xml
>    ==> includes "@layout/include_above_buttons"
>    ==> includes "@layout/include_button_layout_default"
>    ==> includes "@layout/include_below_buttons"
>
> /res/layout/include_above_buttons.xml
> /res/layout/include_below_buttons.xml
> /res/layout/include_button_layout_default.xml
> /res/layout/include_button_layout_small.xml
>
> /res/layout-small/dialog_layout.xml
>    ==> includes "@layout/include_above_buttons"
>    ==> includes "@layout/include_button_layout_small"
>    ==> includes "@layout/include_below_buttons"
>
> Thanks           Ralf
>
> --
> 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
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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