title: Android maps v2 click on popup
body: <p>is there a way to launch an intent to another activity clicking in a google maps v2 popup?</p>
  
  <p>This is my code:</p>
  
  <pre><code>@Override
  public View getInfoContents(Marker marker) 
  {
      View popup=inflater.inflate(R.layout.popup, null);
  
      final TextView tvtitulo=(TextView)popup.findViewById(R.id.tvTitulo);
      TextView tvDatos=(TextView)popup.findViewById(R.id.tvDatos);
      TextView tvCat=(TextView)popup.findViewById(R.id.tvCategoria);
  
      tvtitulo.setText(marker.getTitle());
  
      StringTokenizer tokens = new StringTokenizer(marker.getSnippet(), "?");
      final String first = tokens.nextToken();// this will contain "Fruit"
      String second = tokens.nextToken();// this will contain " they taste good"
  
      tvDatos.setText(first);
      tvCat.setText(second);
  
      ImageView imagen = (ImageView)popup.findViewById(R.id.menuImgView);
  
      if(marker.getTitle().substring(0,3).equalsIgnoreCase("Bar"))
          imagen.setBackgroundResource(R.drawable.bar);
  
      else if(marker.getTitle().substring(0,3).equalsIgnoreCase("Res"))
          imagen.setBackgroundResource(R.drawable.rest);
      else
          imagen.setVisibility(4);
  
      return(popup);
  }
  </code></pre>
  
  <p>I would like to add something like this inside that method:</p>
  
  <pre><code> popup.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              Intent intent = new Intent(getApplicationContext(), InfoLocal.class);
              startActivity(intent);
              finish();
          }
      });
  </code></pre>
  
  <p>Thx for your answers and sorry for my english.</p>