Constraint Layout is most preferred for dynamic and flexible UI combining the advantages of Linear and Relative Layout. This repository consists and shows the use of constraint layout using modern tools like Guidelines, Chains and Barriers.
It is XML code on Android Studio.
It uses flexible sizes for various widgets inside UI. This gives an advantage of flexible UI for screens of various dimensions. Refer it's code here.