Code example for TableLayout.LayoutParams

0
 
	public void initTargetsLayout() { 
		targetContainers = new LinearLayout[MAX_TARGET_COUNT];
		mainContainer = new LinearLayout(this);
		mainContainer.setLayoutParams(new LayoutParams(
				LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
		mainContainer.setOrientation(LinearLayout.VERTICAL);
 
	} 
 
	public void onCreate(Bundle savedInstanceState) {
 
		super.onCreate(savedInstanceState);
 
		initTargetsLayout(); 
		setContentView(mainContainer);
		// TextView tv = new TextView(this); 
		// tv.setText("www"); 
		// setContentView(tv); 
		// setContentView(R.layout.main); 
	}