我有这个图形用户界面:
线性布局
-TableLayout heading
-ViewFlipper flipper
- TableLayout1
- TableLayout2
- TableLayout3
... (dynamicly added)
我在 vf.onLayout(..) 中更改了 t1 的宽度,但我无法重绘它......请帮助:/这是代码:
@Override
protected void onLayout(boolean changed, int left, int top, int right,
int bottom) {
super.onLayout(changed, left, top, right, bottom);
Log.i(TAG, "flipper onLayout");
int idx = this.getDisplayedChild();
Log.i(TAG, "flipper displayed child is: " + idx);
this.heading.cols_widths = some_cols_widths;
this.heading.resize_cols();
LinearLayout lay = (LinearLayout) this.heading.getParent();
lay.requestLayout();
}
这让我发疯:/