public float CalculateListHeight(IReorderableListAdaptor adaptor) { FixStyles(); float totalHeight = ContainerStyle.padding.vertical - 1; // Take list items into consideration. int count = adaptor.Count; for (int i = 0; i < count; ++i) totalHeight += adaptor.GetItemHeight(i); // Add spacing between list items. totalHeight += 4 * count; // Add height of footer buttons. if (HasFooterButtons) totalHeight += FooterButtonStyle.fixedHeight; return totalHeight; }