I found this article when i was lookling to reuse view elements.

http://www.curious-creature.org/2009/02/25/android-layout-trick-2-include-to-reuse/

essentially you can reuse layouts in a master layout by including;


    <include android:id="@+id/cell1" layout="@layout/
workspace_screen" />




On Dec 6, 1:46 pm, DulcetTone <[email protected]> wrote:
> I have a LinearLayout defined in XML that is my parent, and another
> one which (sometimes) I want to include in the parent.  I want to keep
> the optional sub-layout a separate file so it can be used elsewhere.
>
> I have tried creating an empty layout within the parent one, but my
> efforts to findViewById() on it onCreate() give a null pointer.
>
> How do I do this?
>
> tone

-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to