LinearLayout is one of the most basic layouts in Android. It’s used to easily group individual views together in either vertical or horizontal direction.
Linear layout is also very practical because it supports weight. This makes the child views “stretch” to fill out the space in the layout.
This post contains all the code that’s been written in this YouTube video.
Main.axml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:background="#F44336"
android:textSize="70sp"
android:text="1st"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:background="#2196F3"
android:textSize="70sp"
android:text="2nd"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:background="#4CAF50"
android:textSize="70sp"
android:text="3rd"
android:layout_weight="2" />
</LinearLayout>

Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.
Thank you, your article surprised me, there is such an excellent point of view. Thank you for sharing, I learned a lot.