0
我想在平鋪的DataGroup中對齊單元格,以便行增長爲底部而不是頂部。我想我在找什麼就像RowAlign.BOTTOM
,但似乎並不存在。如何使用TileLayout對數據組中的單元格進行底部對齊?
行應該有固定的高度和差距,所以RowAlign.JUSTIFY_USING_GAP
和RowAlign.JUSTIFY_USING_HEIGHT
將不適用於我。
任何提示?
我想在平鋪的DataGroup中對齊單元格,以便行增長爲底部而不是頂部。我想我在找什麼就像RowAlign.BOTTOM
,但似乎並不存在。如何使用TileLayout對數據組中的單元格進行底部對齊?
行應該有固定的高度和差距,所以RowAlign.JUSTIFY_USING_GAP
和RowAlign.JUSTIFY_USING_HEIGHT
將不適用於我。
任何提示?
是的,我想回答我自己的問題。我想要做的是擴展TileLayout並覆蓋updateDisplayList(),但由於過度使用TileList中的私有不可能,所以我最終複製了整個TileList源並在updateDisplayList()中更改了幾行,例如:
var yPos:Number = unscaledHeight - visibleStartY - _rowHeight;
和
yPos -= yMajorDelta;
和
// Move along the minor axis
if (++counter >= counterLimit)
{
counter = 0;
if (orientation == TileOrientation.ROWS)
{
xPos = 0;
yPos -= yMinorDelta;
}
else
{
xPos += xMinorDelta;
yPos = unscaledHeight - visibleStartY - _rowHeight;
}
}
一個黑客,排序的,但工作得很好滿足我的需求。