locoboy locoboy - 1 year ago 95
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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download