views:

17

answers:

1

I have two Activities that both list items in a table. For the time being both currently use the same layout and then inflate it at runtime.

However, to cleanly and strictly separate the two and also allow me to later maybe have slightly different layouts for each, I would like to have two different layout names but simply alias (is that a verb?) one layout to point to the other.

Can that be done? I tried to define an alias id in the strings.xml file but that only yields errors.

Michael

+1  A: 

What if you have one of them simply contain nothing but a single <include> element so that it just includes the other one?

http://developer.android.com/resources/articles/layout-tricks-merge.html

MatrixFrog
Ah! I hadn't known that possibility to exist. Excellent. That's practically what I want! Thanks!
mmo