我有一个TextView
无法满足它的内容(我正在为高度设置动画)。现在我已经添加了自动链接,只要视图的高度小于应有的高度,就可以滚动视图。如何禁用此功能?description.setMovementMethod(null);
阻止链接点击和description.setMovementMethod(LinkMovementMethod.getInstance());
滚动。
编辑:虽然我找到了解决方法,但我还没有找到解决方法。
if(descriptionCropped){
descriptionCropped = false;
//enable movement on expanded view
description.setMovementMethod(LinkMovementMethod.getInstance());
}else{
descriptionCropped = true;
//disable movement on cropped view, have to reset onClick for some reason
//workaround for scrolling text when the view is smaller than it's content
description.setMovementMethod(null);
description.setOnClickListener(this);
}
this
一个在哪里OnClickListener
。