```
package com.example.mediosa.mediosa;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;

import com.firebase.client.Firebase;

public class registerActivity extends AppCompatActivity {

    private Button buttonSignIn, buttonRegister;
    private EditText editTextUsername;
    private EditText editTextEmail;
    private EditText editTextPassword;
    private EditText editTextDOB;
    private EditText editTextName;
    private RadioButton radioButtonMale, radioButtonFemale;

    private Firebase rootRef;

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

        rootRef = new Firebase(FIREBASE_URL");

        buttonSignIn = (Button)findViewById(R.id.buttonSignIn);
        editTextDOB = (EditText)findViewById(R.id.editTextDOBReg);
        editTextUsername = (EditText)findViewById(R.id.editTextUsernameReg);
        editTextEmail = (EditText)findViewById(R.id.editTextEmailReg);
        editTextPassword = (EditText)findViewById(R.id.editTextPasswordReg);
        editTextName = (EditText)findViewById(R.id.editTextNameReg);
        radioButtonFemale =(RadioButton)findViewById(R.id.radioButtonFemale);
        radioButtonMale = (RadioButton)findViewById(R.id.radioButtonMale);

        buttonRegister = (Button)findViewById(R.id.buttonRegister);

        buttonSignIn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(registerActivity.this , 
LoginActivity.class));
            }
        });

        final String Name = editTextName.getText().toString();
        buttonRegister.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(registerActivity.this, Name , 
Toast.LENGTH_SHORT).show();
            }
        });

    }

}

```

I am new to Android and was working on a project.
In this code (Part of that project) in am unable to read data from user as name. The compiler shows no error And the code works correctly but when i try to show the data in the Name string using toast, it is completely blank.

I need this name and other field to store data in Firebase DB, but it was not working and i found out there was some problem in reading data. 
Would be really great if anyone can help me, thanks.