Code example for StaticLayout

Methods: getLineCount, getLineTop

0
	 * @return the item height 
	 */ 
	private int getItemHeight() { 
		if (itemHeight != 0) {
			return itemHeight;
		} else if (itemsLayout != null && itemsLayout.getLineCount() > 2) {
			itemHeight = itemsLayout.getLineTop(2) - itemsLayout.getLineTop(1);
			return itemHeight;
		} 
		 
		return getHeight() / visibleItems;
	} 
 
	/** 
	 * Calculates control width and creates text layouts 
	 * @param widthSize the input layout width 
	 * @param mode the layout mode 
	 * @return the calculated control width 
	 */ 
	private int calculateLayoutWidth(int widthSize, int mode) {
		initResourcesIfNecessary();