不管是在activity还是在xml里设置maxEms 都是无效的,我看其它博客上说android:layout_width="wrap_content"才好用,我就是怎么写的,然而也没有显示出来
经过多次测试
TextView.setSingleLine(false);
TextView.setMaxLines(1);
TextView.setMaxEms(15);
TextView.setEllipsize(android.text.TextUtils.TruncateAt.valueOf("END"));
就显示出来了