Abstract
While it is technically possible to create and attach widgets to our activity purely through Java code, the way we did in Chapter 4, the more common approach is to use an XML-based layout file. Dynamic instantiation of widgets is reserved for more complicated scenarios, where the widgets are not known at compile-time (e.g., populating a column of radio buttons based on data retrieved off the Internet).
Chapter PDF
Rights and permissions
Copyright information
© 2009 Mark L. Murphy
About this chapter
Cite this chapter
(2009). Using XML-Based Layouts. In: Beginning Android. Apress. https://doi.org/10.1007/978-1-4302-2420-4_5
Download citation
DOI: https://doi.org/10.1007/978-1-4302-2420-4_5
Publisher Name: Apress
Print ISBN: 978-1-4302-2419-8
Online ISBN: 978-1-4302-2420-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)