0
excuse ignorance, but I am learning alone and reading a lot, I am at the beginning, I need to generate a password by calculating day * month * year, I created the variable that calculates this but I cannot make it appear, I left a string where it should appear!
    package com.roberto.senhauniplus;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import java.text.SimpleDateFormat;
import java.util.Date;
public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    public void texto(View view){
        TextView texto = findViewById(R.id.gerarsenha);
        texto.setText(R.id.gerarsenha);
        texto.setText("quero que a senha apareça aqui"); // aqui onde o botão substitui o texto pela senha!
        int senha = dia*mes*ano; // aqui onde calcula (ainda não testei)
    }
    Date dataAtual = new Date();
    int dia = dataAtual.getDate();
    int mes = dataAtual.getMonth();
    int ano = dataAtual.getYear();
}
I am using android studio, have a button where generates password working right, really just need to print the password!
then would be like text.setText(System.out.println(password)); ? actually is not accepting this variable anyway :(
– Suporte Virtual Informática
excuse the ignorance, I’m really starting!
– Suporte Virtual Informática