Hỏi về hàm android:layout_below

tại sao cái android2 của em lại không nằm dưới cái android1 ạ


Và sao không thấy gợi ý của hàm android:layout_below ạ

Because your TextView’s parent is ConstraintLayout which doesn’t know about layout_below attribute of its child so that put it in correct position. But good news to you: There are a lot of solutions for this and I point you 2 solutions.

Solution: change ConstraintLayout to RelativeLayout which provides layout_below attribute for TextView or use layout_to_be constraint_below_of (sorry, I forgot how to spell it) of Constraint Layout which somehow similar to layout_below of RelativeLayout

1 Like
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?