Grato pela resposta Marcelo Alves! Consegui utilizando um setTag na image e comparando-a em seguinda no evento do click:
// no onCreateView
((ImageView) rootView.findViewById(R.id.image)).setTag(menu); ((ImageView) rootView.findViewById(R.id.image)).setImageResource(imageId); // no listener public void selecionarOpcao(View view) { String menuString = (String) view.getTag(); if(menuString.equals("Pizzas")){ // start activity } else if /// Other Condition }
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 comentários:
Postar um comentário