0
i created a script where I intend to call separate activities
but it’s not working
package com.example.john.new_login;
import android.content.Context; import android.content.Intent;
import com.example.john.new_login.login.Registration; import com.example.john.new_login.login.Password recovery;
/** * Created by John on 09/12/2017. */
public class Botoes_login {
private static Context context;
public static void Registro() {
Intent registro = new Intent(context, Cadastro.class);
context.startActivity(registro);
}
public static void RecuperaSenha() {
Intent recuperasenha = new Intent(context, RecuperaSenha.class);
context.startActivity(recuperasenha);
}
public static void Login() {
Intent login = new Intent(context, Login.class);
context.startActivity(login);
}
}
how it would be the right way to create a class for this?
was exactly that, I was forgetting to pass the Context to the classes, this way, n would work even, thank you
– Jonnys J.