import android.app.*; import android.widget.*; import android.view.*; sclass ASingleComponentPanel extends LinearLayout { *() { super(androidActivity()); } *(View component) { this(); setComponent(component); } void setComponent(View component) { removeAllViews(); if (component != null) { component.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)); addView(component); } } }