content: package com.androidgames.tictactoe;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  
  public class RegistroActivity extends AppCompatActivity {
      EditText etName, etEmail, etPass;
      Button btnRegistro;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_registro);
  
          etName = findViewById(R.id.editTextName);
          etEmail = findViewById(R.id.editTextEmail);
          etPass = findViewById(R.id.editTextPassword);
          btnRegistro = findViewById(R.id.buttonRegistro);
  
          eventos();
  
      }
  
      private void eventos() {
          btnRegistro.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  String name = etName.getText().toString();
                  String email = etEmail.getText().toString();
                  String password = etPass.getText().toString();
  
                  if(name.isEmpty()) {
                      etName.setError("El nombre es obligatorio");
                  } else if(email.isEmpty()) {
                      etEmail.setError("El email es obligatorio");
                  } else if(password.isEmpty()) {
                      etPass.setError("La contraseña es obligatoria");
                  } else {
                      //TODO: realizar registro en Firebase Auth
                  }
              }
          });
      }
  }
  