Layouts
We have already seen ConstraintLayout,
but there are more. Layouts are the building blocks that group together the other UI elements. Layouts can, and often do, contain other layouts themselves.
Let's look at some commonly used layouts in Android because knowing the different layouts and their pros and cons will make us more aware of what can be achieved, and therefore expand the horizons of what is possible.
We have already seen that once we have designed a layout, we can put it into action using the setContentView
method in our Java code.
Let's build three designs with different layout types, and then put setContentView
to work and switch between them.