Tecnologia do Blogger.
RSS

[androidbrasil-dev] Re: Dá para fazer comparação de string-array?

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.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário