I have this situation: an abstract activity and a series of activities that extend this one. The difference from parent activity is just a piece of layout, and some methods, how can I do with the layout? I declare 'n' very similar layout ? or I can only declare one and then extend only to the extent that change? and in this case, how?
I give you an example.
In MyAbstractActivity i call setContentView(R.layout.abstract_layout), where abstract_layout.xml has this layout:
<LinearLayout>
<Button id=1/>
<Button id=2/>
<Button id=3/>
<Button id=4/>
</LinearLayout>
Now in MyConcreteActivity that extends MyAbstractActivity suppose that we want a textfield below Button with id=2, how we can do?
Thanks in advance!
EDIT: Solved using ViewStub in superclass and changing it in subclasses.