Code example for TableLayout.LayoutParams

0
		if(lbl != null) layout.addView(lbl);
	} 
	 
	final public void addToTable(TableLayout table) {
		TableRow row = new TableRow(Main.player.getActivity());
		LayoutParams params = new TableLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);	
		table.addView(row, params);
		 
		row.addView(getButton());	
		 
		TextView lbl = getDescriptionLabel();
		if(lbl != null) row.addView(lbl);
	} 
	 
	protected class ReEnable implements Runnable {
		private static final long serialVersionUID = 7460815865921818638L;
		 
		Command cmd;
		public ReEnable(Command cmd) {
			this.cmd = cmd;
		}