private static int getMaxLines(AppCompatTextView view)
{
int maxLines = -1; // No limit (Integer.MAX_VALUE also means no limit)
TransformationMethod method = view.getTransformationMethod();
if (method != null && method instanceof SingleLineTransformationMethod)
{
maxLines = 1;
}
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
{
// setMaxLines() and getMaxLines() are only available on android-16+
maxLines = view.getMaxLines();
}
return maxLines;
}
AutofitHelper.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:stynico
作者:
评论列表
文章目录