Code example for TableRow

Methods: setId, setLayoutParams, setOnClickListener, setPadding

0
    } 
     
    //protected TableRow buildResultTableHeadingRow(String headings[]) { 
    protected TableRow buildResultTableRow(String items[], Boolean heading) {
    	// create the table row with a new id 
        TableRow tr = new TableRow(this);
        tr.setId(currentID++); //XXX set this to be the team id?
        tr.setLayoutParams(new LayoutParams(
        		LayoutParams.FILL_PARENT,
        		LayoutParams.WRAP_CONTENT));
        tr.setPadding(5, 5, 5, 5);
        tr.setOnClickListener(this);
         
        for ( String item : items ) { 
	        // create a TextView to show the name of the row 
	        TextView labelTV = new TextView(this);
	        labelTV.setId(currentID++);
	        labelTV.setText(item);
	        labelTV.setTextColor(Color.WHITE);
	        if ( heading ) {
Contextual code suggestions in your IDE  Get Codota for Java