ConstraintLayout 水平方向權重問題

實現效果如下: 

如上圖顯示,想讓 中間控件全部填充,設置權重佔比問題

                    tv1應設置的屬性:app:layout_constraintTop_toTopOf="parent"

                                                  app:layout_constraintBottom_toTopOf="@+id/tv2"

                   tv2應設置的屬性:app:layout_constraintBottom_toTopOf="@+id/tv3"

                                                  app:layout_constraintTop_toBottomOf="@+id/tv1"

                                                   android:layout_height="0dp"

                   tv3應設置的屬性:app:layout_constraintBottom_toBottomOf="parent"

                                                  app:layout_constraintTop_toBottomOf="@+id/tv2"



 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章