I have an Activity in which user can update a specific information clicking in a button near a label. This buttons than triggers a Dialog where I have some fields to get user input and a button to finish editing.

My problem is that I am not able to get a reference to the button declare in the dialog specific xml layout. The button reference returns null. Follow some code snippet to ilustrate.

Button which fires the event to build the dialog is declared as a instance variable in the activity as follows:

private Button bConfigurarCarro;

than onCreate method:

bConfigurarCarro = (Button)findViewById(R.id.bConfigurarCarro);
 bConfigurarCarro.setOnClickListener(configuraCarroListener);

this correctly fires the event to create the dialog:

protected OnClickListener configuraCarroListener = new OnClickListener(){
public void onClick(View v) {
showDialog(CARRO_DIALOG_ID);
Log.d(TAG, "Executando evento do botão de configuração de carro no abastecimento.");
            }
        };

than to create the dialog Overrides onCreateDialog method like this:

@Override
protected Dialog onCreateDialog(int id) {
  switch (id) {
    case TIME_DIALOG_ID:
        return new TimePickerDialog(this, mTimeSetListener, hora, minuto, false);
    case DATE_DIALOG_ID:
        return new DatePickerDialog(this, mDateSetListener, ano, mes, dia);
    case CARRO_DIALOG_ID:
        Log.d(TAG, "Criando dialog de cadastro de carro.");
        dialogCarro = new Dialog(this);
        dialogCarro.setContentView(R.layout.novo_carro_dialog);
        bSalvarCarro = (Button)findViewById(R.id.botaoSalvarCarro);
        bSalvarCarro.setOnClickListener(salvarCarroListener);
        dialogCarro.setTitle("Carro");
        dialogCarro.getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
        Log.d(TAG, "Dialog de cadastro de carro criado retornando...");
  
Edit
Report