0
Good evening! I have the following situation :
case R.id.item_cep:
corPadrao = Color.parseColor("#4DC184");
imgCircle.setColorFilter(corPadrao);
nomeRoteirizacao.setText("Por Cep");
setActivityBackgroundColor(corPadrao);
Intent intent = new Intent(getApplicationContext(),InformarEntrega.class);
Bundle params = new Bundle();
params.putString("cor","#4DC184");
intent.putExtras(params);
where by clicking on item_cep
it stores the color, only in another class(Class is Adapter) I need to have this color how to proceed?
Am I doing it right? and how do I get this color in the Adapter class?
As far as I know, the Bundle parses between activitys (or Fragments) I have never tried to use it to pass an element to another class. You can use a variable to pass the color to the Adapter class or use Sharedpreferences or have a model that contains the 'color' string and use this model to parse the data.
– Marcela Melo
how would I pass the color to the class ? I already have the variable in the first Activity
– Diego Dias Mól