Android ConstraintLayout 屬性

原文鏈接:https://mp.csdn.net/postedit

app:layout_constraintLeft_toLeftOf 表示此控件的左邊框與某個控件的左邊框對齊或者在其右邊
app:layout_constraintLeft_toRightOf 表示此控件的左邊框與某個控件的右邊框對齊或者在其右邊
app:layout_constraintRight_toLeftOf 表示此控件的右邊框與某個控件的左邊框對齊或在其左邊
app:layout_constraintRight_toRightOf 表示此控件的右邊框與某個控件的右邊框對齊或在其左邊
app:layout_constraintTop_toTopOf 表示此控件的頂部邊框與某個控件的頂部邊框水平對齊或在其下邊
app:layout_constraintTop_toBottomOf 表示此控件的頂部邊框與某個控件的底部邊框水平對齊或在其下邊
app:layout_constraintBottom_toTopOf 表示此控件的底部邊框與某個控件的頂部邊框水平對齊或其上邊
app:layout_constraintBottom_toBottomOf 表示此控件的底部邊框與某個控件的底部邊框水平對齊或其上邊
app:layout_constraintBaseline_toBaselineOf 表示此控件與某個控件水平對齊
app:layout_editor_absoluteX 表示此控件在佈局中X軸的絕對座標點
app:layout_editor_absoluteY 表示此控件在佈局中Y軸的絕對座標點
app:layout_constraintGuide_begin 表示在佈局中引導線距頂部或左邊框的距離
app:layout_constraintGuide_end 表示在佈局中引導線距底部的距離
app:layout_constraintGuide_percent 表示在整個佈局中引導線距離左邊框的百分百
app:layout_constraintStart_toEndOf 表示此控件的左邊界在某個控件右邊界的右邊,及表示此控件在某個控件的右邊
app:layout_constraintStart_toStartOf 表示此控件的左邊界與某個控件的左邊界在同一垂直線上
app:layout_constraintEnd_toStartOf 表示此控件的右邊界與某個控件的左邊界在同一垂直線上
app:layout_constraintEnd_toEndOf 表示此控件的右邊界與某個控件的右邊界對齊
app:layout_constraintHorizontal_bias 表示此控件在佈局中的水平方向上的偏移百分百
app:layout_constraintVertical_bias 表示此控件在佈局中的的垂直方向上的偏移百分百
app:layout_constraintDimensionRatio 表示兩個控件的縱橫比,而使用則需要把寬(layout_width)或者高(layout_height)設置爲0dp,根據另一個屬性和比例, 計算當前屬性, 如兩個圖片控件的顯示大小,app:layout_constraintDimensionRatio=”4:3”;
app:layout_goneMarginLeft
app:layout_goneMarginTop
app:layout_goneMarginRight
app:layout_goneMarginBottom
app:layout_goneMarginStart
app:layout_goneMarginEnd
————————————————
 

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