Code example for Layout

Methods: getLineTop

0
	 */ 
	public static int getTextViewHeight(TextView pTextView) {
		Layout layout = pTextView.getLayout();
		int desired = 0;
		if (layout != null) {
			desired = layout.getLineTop(pTextView.getLineCount());
		} 
		int padding = pTextView.getCompoundPaddingTop()
				+ pTextView.getCompoundPaddingBottom();
		return desired + padding;
	} 
 
	/** 
	 * 得到某textView的实际显示高度 
	 */ 
	public static int getTabTitleTextViewHeight(TextView pTextView) {
		int desired = 0;
		if (pTextView.getLineCount() == 0) {
			desired = pTextView.getLineHeight()
					* (pTextView.getLineCount() + 2);
		} else {