What is the difference between a layout and a container in Android?

后端 未结 3 2155
温柔的废话
温柔的废话 2021-02-12 14:31

In android studio, in design section, Layouts and Containers are categorized separately.

What is the fundamental difference between them?

3条回答
  •  渐次进展
    2021-02-12 14:48

    A container is a view used to contain other views. Android offers a collection of view classes that act as containers for views. These container classes are called layouts, and as the name suggests, they decide the organization, size, and position of their children views.

    Layouts are basically containers for other items known as Views, which are displayed on the screen. Layouts help manage and arrange views as well. Layouts are defined in the form of XML files that cannot be changed by our code during runtime.

提交回复
热议问题