Code example for TableRow

Methods: setLayoutParamsaddView

0
        dateView.setTextColor(getDateColor());
        return dateView;
    } 
 
    private TableRow createTableRow(final String team, final String score, final String tempScore, final String bet) {
        final TableRow r = new TableRow(this.context);
        r.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT));
        final TextView teamName = new TextView(this.context);
        teamName.setText(team);
        r.addView(teamName);
        final TextView teamScore = new TextView(this.context);
        final String showScore;
        if ("-".equals(score) && !"".equals(tempScore)) {
            showScore = tempScore;
            teamScore.setTextColor(Color.YELLOW);
        } else { 
            showScore = score;
        } 
        teamScore.setText(showScore + " (" + bet + ")");
        teamScore.setGravity(Gravity.RIGHT);
        r.addView(teamScore);
        return r;
    } 
 
    private void drawView() { 
        final TableLayout.LayoutParams tlp = new TableLayout.LayoutParams(TableLayout.LayoutParams.FILL_PARENT, TableLayout.LayoutParams.WRAP_CONTENT);