MainActivity.java

Home   »   MainActivity.java

/**
 * Código para acompanhar placar de um jogo de Futebol Americano.
 */
public class MainActivity extends AppCompatActivity {

    // Placar Time A
    private int scoreTeamA;

    // Placar Time B
    private int scoreTeamB;

    /**
     * Views.
     */

    private TextView scoreViewA;
    private TextView scoreViewB;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        bindViews();
    }

    private void bindViews() {
        scoreViewA = (TextView) bindView(R.id.team_a_score);
        scoreViewB = (TextView) bindView(R.id.team_b_score);
    }

    private View bindView(int viewId) {
        return findViewById(viewId);
    }
    
    (...)

Leave a Reply

Your email address will not be published. Required fields are marked *