You can use the TextUtils.EllipsizeCallback
. When the text gets ellipsized this callback is done by the textview. Here you can set text size smaller than the current.
EDIT : Otherwise you can use TextUtils.ellipsize
this way
while (mText != TextUtils.ellipsize(mText, textPaint, other params)) {
textpaint.setTextSize(textpaint.getTextSize() - 1);
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…