List of usage examples for android.text Layout getLineCount
public abstract int getLineCount();
From source file:android.support.v7.widget.Toolbar.java
/** @hide */ public boolean isTitleTruncated() { if (mTitleTextView == null) { return false; }//from w ww . j a v a2 s . co m final Layout titleLayout = mTitleTextView.getLayout(); if (titleLayout == null) { return false; } final int lineCount = titleLayout.getLineCount(); for (int i = 0; i < lineCount; i++) { if (titleLayout.getEllipsisCount(i) > 0) { return true; } } return false; }