2
您好我正尝试使用此代码设置ScrollView上的边距,但没有任何反应。以编程方式设置滚动视图上的边距
ScrollView sv = new ScrollView(this);
LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.VERTICAL);
LayoutParams layoutParams = new ScrollView.LayoutParams(
ScrollView.LayoutParams.FILL_PARENT,
ScrollView.LayoutParams.WRAP_CONTENT);
// layoutParams.bottomMargin = 100;
layoutParams.setMargins(0, 0, 0, 100);
sv.setLayoutParams(layoutParams);
sv.addView(ll);
// Add a TableView to ScrollView...
// Display my view
this.setContentView(sv);
我想要做的是有一些按钮在ScrollView的下方,所以你总是看到它们。
我对Android开发颇为陌生,所以有任何建议,我们将不胜感激。
/奥莱
十分感谢!这比我想出来的要好。 – Olle 2011-08-05 06:58:03
我们欢迎;)......... – 2011-09-02 10:19:16