Code example for TableLayout.LayoutParams

0
 
	public static View getLabel(String text) {
		Context context = DragAndDropManager.getInstance().getContext();
		TextView textView = new TextView(context);
		textView.setText(text);
		textView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
		//textView.setGravity(Gravity.TOP + Gravity.LEFT); 
		return textView;
	} 
	 
}