Relation Between Activity and Its Layout in Android
In Eclipse, anytime that I create a new Activity in my Android app, in
addition to the Java Activity class, a companion layout xml file is also
generated. Obviously, I could generate 10 layouts and switch the
Activity's layout between these 10 anytime I want.
So, my question is why this layout is being generated; is it generated for
convenience or is it a good practice to always have a specific layout
associated with the Activity?
Also, does an Activity always have to have a layout, or that I could have
an Activity that never uses a layout.
No comments:
Post a Comment