How to Programmatically Setup a Android ConstraintLayout Chains and Chain Styles

Sdílet
Vložit
  • čas přidán 7. 11. 2021
  • This video is an introduction to programmatically setting up Android ConstraintLayout chains and chain styles using Java. Specifically, it does this 3 ways to set the chain style for buttons:
    1. Using XML/design editor
    2. Using the ConstraintSet convenience class
    3. Using the ConstraintLayout.LayoutParams
    Previous video showing how to set up ConstraintLayout using XML/design editor: • Introduction to Androi...
    Previous video showing how to set up the ConstraintSet: • How to Programmaticall...
    Previous video showing how to set up the ConstraintLayout.LayoutParams: • How to Programmaticall...
    ConstraintLayout documentation: developer.android.com/trainin...
  • Jak na to + styl

Komentáře • 4

  • @SheezZarR
    @SheezZarR Před rokem +1

    Gina thanks for the tutorial! I have been looking for ways to create a grid using the layout.
    A probable tip for better search results: I would suggest adding in the description something like "creating grid with constraintlayout" / "alternative way to create a grid". Not an expert in SEO tho

  • @cathysprint6330
    @cathysprint6330 Před 2 lety +1

    Great presentation.

  • @naejsyned6878
    @naejsyned6878 Před 2 lety

    Excellent tutoriel§ Très bien expliqué, merci beaucoup Gina!

  • @NickProkhorenko
    @NickProkhorenko Před rokem

    How i can set distance on constraint?
    layoutParams.startToStart = button.getId();
    And what next? I want to set width or height with constaints.