Code example for TableLayout.LayoutParams

		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);
		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;
Connect your IDE to all the code out there  Get Codota for Java