2012-01-26 39 views

回答

1

当然,你可以把你的整个布局的滚动型的内部程序是这样的:

LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
View view = inflater.inflate(R.layout.mylayout, null); 
ScrollView scrollView = new ScrollView(this); 
scrollView.addView(view); 
setContentView(scrollView); 
+0

这伟大工程。我们非常接近,但需要addView方法。谢谢! –