Code example for TableLayout

Methods: getChildAt

0
		((Button)randomTableRow.getChildAt(column)).setText(countryName);
	} 
	 
	private TableRow getTableRow(int row)
	{ 
		return (TableRow) buttonTableLayout.getChildAt(row);
		 
	} 
	 
	private String getCountryName(String name)
	{ 
		return name.substring(name.indexOf('-')+1).replace('-',' ');
		 
	} 
 
	private void submitedGuess(Button guessButton)
	{ 
		String guess = guessButton.getText().toString(); 
		String answer = getCountryName(correctAnswer); 
		++totalGuesses;