To use weight correctly, don't bother anymore
android:layout_width="match_parent"
How to set weight in android:layout_width="wrap_content" two cases. Because this setting is simply wrong usage.
The correct usage is:
First set android:layout_width="0dp" or android:layout_height="0dp"
Then adjust the weights
And the weight at this time is also very easy to understand: weight is the proportion! Proportion! Please see the figure below