我正在运行此代码,并且模拟器正在发布强制退出。有谁知道可能出了什么问题?
TableLayout tl = (TableLayout)findViewById(R.id.tableLayout1);
TableRow tr = new TableRow(this);
tr.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
ImageView IV = new ImageView(this);
IV.setBackgroundResource(R.drawable.celtics);
IV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
tr.addView(IV);
tl.addView(tr);