Android: How to dynamically include a XML Layout?

前端 未结 2 789
逝去的感伤
逝去的感伤 2020-12-14 00:08

I want to decompose my UI into several XML Layouts. The first one would be the main layout, and the other ones would be the content layouts.

I would like to be able

2条回答
  •  有刺的猬
    2020-12-14 00:31

    You could try using a ViewStub and just change which layout it is going to inflate programatically.

    This answer discusses using one ViewStub.

提交回复
热议问题