1.append方法:添加文本
public final void append(CharSequence text)
public void append (CharSequence text,int start,int end)//start和end为追加文本起始位置和结尾位置
2.addTextChangeListener方法:为文本添加一个监听器监听文本内容的改变
TextView myTextView = null;
myTextView.addTextChangedListener(new TextWatcher{
@Override
public void afterChanged(Editable s){
//文本改变后
}
@Override
public void beforeTextChange(CharSequence s,int start,int count,int after){
//文本改变前
}
@Override
public void onTextChange(CharSequence s,int start,int before,int count){
//文本改变时
}
});
3.setText方法:用于设置TextView文本框的内容
public final void setText(CharSequence s)
4.setTextSize方法:用于舍子文本框显示内容的字