开发者

Android force quitting

开发者 https://www.devze.com 2023-02-14 07:04 出处:网络
I\'m running this code and the emulator is posting a force quit. Does anyone know what could be wrong?

I'm running this code and the emulator is posting a force quit. Does anyone know what could be wrong?

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(Lay开发者_JS百科outParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
        tr.addView(IV);
        tl.addView(tr);


I actually found a way to get around this by doing this dynamically. I deleted the xml file and created the table in Java

0

精彩评论

暂无评论...
验证码 换一张
取 消