Hi everyone, Just a small problem really, I'm wanting to place the current year into the footer of my apps. Each footer is a TextView and is seen on menu screens etc. Is there a way to insert the year into this dynamically?
Cheers, Laurence
Hi everyone, Just a small problem really, I'm wanting to place the current year into the footer of my apps. Each footer is a TextView and is seen on menu screens etc. Is there a way to insert the year into this dynamically?
Cheers, Laurence
You can do something like:
Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR);
TextView footer = findViewById(R.id.footer);
footer.setText("" + year);