In part 4 of the ConstraintLayout tutorial, we will learn how to use some of the new features and helpers of version 1.1.0 of the ConstraintLayout.
We will set the app:layout_constrainedWidth attribute to true to make a view with a width of wrap_content shrink to it’s constraints’ width if they are smaller than it’s wrap_content width. And vice versa there is also an app:layout_constrainedHeight attribute for the height.
We will also learn how to use the app:layout_constraintWidth_percent and app:layout_constraintHeight_percent attributes to set the size of a view as a percentage of the parent layout, and how to use barriers to move views dynamically when other views grow in size, by referencing them in the app:constraint_referenced_ids attribute. With the app:barrierAllowsGoneWidgets attribute we can change if the barrier should be constrained by widgets with a visibility of gone.
And lastly we will learn how to reference and use groups to change the visibility state of multiple views at once, either directly in xml or in Java code.
Watch the full playlist:
____________________
⭐ Get my new MVVM Caching Course now:
❗ Subscribe to the channel:
💲 Earn money by becoming an affiliate for my courses:
📨 Subscribe to the Coding in Flow newsletter:
💻 Hire me for your next project:
💚 Donate to Coding in Flow with a message:
❓ Ask your programming questions in our chat:
📣 Follow Coding in Flow on other sites:
Facebook:
Instagram:
Twitter:
Github:
Tag: constraintlayout trong android, 2018, android, android development, android studio, android studio tutorial, android tutorial, beginners, tutorial, constraintlayout, constraintlayout android, constraintlayout barrier, constraintlayout group, constraintlayout 1.1, android constraintlayout, android constraintlayout tutorial, android constraintlayout barrier, android constraintlayout group, constraintlayout group visibility, constraintlayout group views, constraintlayout barrier not working
Xem thêm: https://icongnghe.org/category/pc
Nguồn: https://icongnghe.org
24 Bình luận. Leave new
Thanks man, helped me
Hi.. In Barriers example.. If text size gets increased more than you show in example, then the buttons UI (Set of UI which is to RHS of barrier) get's disturbed. How to restrict the text length by retaining the UI not disturbed which is right side of barrier ?
2:58 Constraining a button to a barrier does not work in Android Studio 4.0. Did they remove that option or am I doing something wrong? Thanks
well! its what has encouraged me to learn android after being in the half of the semester…Thank u, sir, wholeheartedly…stay blessed!
All your tutorials ate perfectly done! just wanted to say thank you and well done 🙂
Your simple-no-bullshit approach is the best!!!!
Thank you!
you are genius
Great video as always. How do you add a favorite attribute to the attribute tab like you did with the visibility attribute?
Thanks a lot sir <3
The quality of these tutorials is A+. This is better, pedagogically, than many students are going to get in an average classroom. People like you are changing the world. Take care.
hi, also despite of setting barrierAllowsGoneWidgets to true,the barrier moves to the other text view
hi, when i use constraint width percent and set it to 1,it does not take the width of the parent as i expected?
constraint layout is relative layout on steroids
Barrier is visible in the component but not in the layout editor area, I'm tried several times but it is not visible. Please tell me what to do. Screenshot – https://drive.google.com/file/d/1E_MzSvlo_2kiQwbPxC7P3j5vsgjFdZqp/view?usp=sharing
is this design dynamic in runtime?
Great video, as someone said no bullshit, straight to the point, no new project being created, everything your saying is relevant, very good !.
Thanks for great tutorial sir.
I finally understood the Barriers. Thank you so much! Your simple-no-bullshit approach is the best!
Coding in Flow please make videos on Web api application using retrofit or async please ur explanation is easy to understand please make it
Hey can u make a video on simple library. It's a library for xml parsing. I recently found it and I've been using it for a long time and it is really great. There isn't really a video on it so it would be great if u can make a video on it so any newcomer won't have any problems. http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php
hi Florian could you do a video about Preference Activity? there isn't much of tutorial out there
You made my day
Make video on mobile screen recorder app