2012-01-26 78 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方法。謝謝! –