Code example for TableRow.LayoutParams

0
	public static void styleTableRowImageView( 
		Context context,
		ImageView imageView,
		int weight)
	{ 
		LayoutParams rowParams = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
		rowParams.gravity = Gravity.CENTER_VERTICAL;
		rowParams.weight = 1;
		imageView.setLayoutParams(rowParams);
	} 
	 
	private static int getTableRowBackground(TableRowLocation location)
	{ 
		if (location == TableRowLocation.First)
		{ 
			return R.drawable.form_field_top; 
		} 
		else if (location == TableRowLocation.Middle)
		{ 
			return R.drawable.form_field; 
		}