locoboy locoboy - 10 months ago 76
Android Question

Android force quitting

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.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));

Answer Source

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