Does Android support layout inheritance (similar to Django templates)? -
i may misunderstanding how <include>
, <merge>
work, according simple example of <merge> , <include> usage in android xml-layouts, <include>
means "take file , paste contents here".
let's want have 3 activities have same header, have different content. you'll still need have 3 xml layout files each activity. difference between each of layout's define different layout in <include>
tag. if wanted add footer i'd have change each layout.
i'm looking way achieve inverse, children layouts override specific blocks of parent (similar django templates). way, if wanted add footer, change parent , children continue override content.
let's want have 3 activities have same header, have different content. you'll still need have 3 xml layout files each activity. difference between each of layout's define different layout in tag.
if want have 3 activities have same header, have 1 layout file per activity. file have widgets unique activity, , <include>
element common header.
that way, if wanted add footer, change parent , children continue override content.
that not supported android @ time. janoliver indicates, roll own solution this.
Comments
Post a Comment