当前位置: 代码迷 >> Android >> 请问:TextView怎么判断添加到底部了
  详细解决方案

请问:TextView怎么判断添加到底部了

热度:15   发布时间:2016-04-28 04:12:28.0
请教:TextView如何判断添加到底部了?
请教各位高手,textview有没有办法判断到了最后一行了?到最后一行的话就清空textview
------解决方案--------------------
或者用length来判断?
------解决方案--------------------

int maxLines = textview.getMaxLines();
int cunrrentLines  = getLineCount();
if(maxLines  == cunrrentLines  ){
     textview.setText("");
}
  相关解决方案