i add a menu to change color of text and i want to keep the color even after exit activity or the app is closed
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()){
case R.id.red :
txt.setTextColor(red);
break;
case R.id.green :
txt.setTextColor(Color.parseColor("#03A136"));
return true;
case R.id.blue :
txt.setTextColor(Color.parseColor("#222CA1"));
return true;
case R.id.black :
txt.setTextColor(Color.BLACK);
return true;
case R.id.brown :
txt.setTextColor(Color.parseColor("#CC805C"));
return true;
}
return super.onOptionsItemSelected(item);
}