Dynamically-created layouts will appear on the screen and will respond noticeably faster than static layouts will.
Dynamically-created user interfaces can adapt to an application’s runtime state,such as the amount of data that needs to be
displayed at any one time.Dynamic layouts can take advantage of contextual information that’s not tracked by Android‘s configuration system (such as current location,usage time,or ambient light measurements).
Static layouts can’t take advantage of contextual information,such as the device’s orientation.
解决方法
第二个和第三个语句是True,因为这是只能在运行时确定的信息,以便利用您需要创建一些动态布局设置,例如更新地图上的位置,或更新您所在地区的当前天气.
底部语句为False,因为您可以在XML文件中具有专门针对设备方向命名的布局,例如布局land.xml.当配置更改为横向时,Android将正确选择此布局.
请记住,Android允许您同时使用静态和动态布局,但从我所阅读的内容中,大多数人会尽可能选择静态布局选项,因为这种分离使布局更改变得更加容易. Dynamic vs XML layout in Android?
祝你好运,我相信我也在做同样的事情.
干杯,
阿列克谢蓝.