Ugh, now I feel bad. I swear I googled BEFORE asking, but after understanding my question in a different way after posting here I did some research and found the following post:
http://www.curious-creature.org/2009/03/01/android-layout-tricks-3-optimize-part-1/ This is exactly what I'm trying to do and answers all my questions. I figured I'd reply to my own post for archival purposes! Thanks! On Mar 4, 1:59 pm, Jonathan <jon.aposto...@gmail.com> wrote: > Right now I have a class that extends LinearLayout and builds the view > inside of the constructor using a series of addViews. > > I wanted to move this into an XML file, so I have the same view > defined there. My problem is that I can't figure out how to load the > XML file in the constructor of the derived class. I looked up the > LayoutInflater stuff, but I wasn't entirely sure how to use it in that > context. Do I need to call addView() with the result of the > LayoutInflater? > > Is this even possible? > > The other issue is that the context object that is passed in doesn't > have the LayoutInflater methods... I'm not sure if I need an instance > of Activity to do that. > > I hope this is clear.. thanks! -- 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