我想将视图放在缓冲区之类的东西中,然后再显示它们。就像是:
public void addTextView(int belowId, int id,String text){
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
lp.addRule(RelativeLayout.BELOW, belowId);
lp.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
TextView tv = new TextView(this);
tv.setId(id);
tv.setText(text+"\n");
///i mean something like this:
buffer = addview(tv,lp)
}
然后展示它
public void showview(bufferview b){
RelativeLayout rSub= (RelativeLayout) findViewById(R.id.rSub);
rsub.addview(b);
}