请问怎么动态设置一个控件的绝对位置?
我看了下CSDN博客中的文章,然后代码如下:
在OnGreat中对某一个TextView操作
final TextView widget79 = (TextView) findViewById(R.id.widget79);
AbsoluteLayout.LayoutParams linearParams = (AbsoluteLayout.LayoutParams)widget79.getLayoutParam();
linearParams.height = 70;
widget79.setLayoutParams(linearParams);
这样程序运行会报错关闭,屏蔽以上代码就正常
另外,怎么设置绝对位置?