Android TextView追加文字

private int offset = 0;
textview.append("string" + "\n");
offset = textview.getLineCount() * textview.getLineHeight();
if (offset > textview.getHeight()) textview.scrollTo(0, offset - textview.getHeight());

 

你可能感兴趣的:(android)