title: listview startactivty on click item
body: <p>I'm trying to start an activity when the user clicks on an item in the <code>listview</code>. In the adapter below, I get problems in <code>intent</code> and in the onClick. What could be causing the failure?
   ok after update the code is missing }};}}  character like  after editing my code and </p>
  
  <p>my code 
      return rowView;</p>
  
  <pre><code>listView.setOnItemClickListener(new OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView&lt;?&gt; parent, View view,
          int position, long id) {
         int itemPosition     = position;
         String  itemValue= (String)listView.getItemAtPosition(position);
  if (itemValue.equals("1")){
  Intent intent = new Intent(context, Spain.class);
  context.startActivity(intent);}
  else if (itemValue.equals("2")) {
  Intent intent = new Intent(context, As.class);
  context.startActivity(intent);}
  else if(itemValue.equals("3")){
  Intent intent = new Intent(context, Ma.class);
  context.startActivity(intent);}
  else if(itemValue.equals("4")) {
  Intent intent = new Intent(context, Me.class);
  context.startActivity(intent);}
  else if (itemValue.equals("5")){ 
  Intent intent = new Intent(context, Gr.class);
  context.startActivity(intent);}
   else if(itemValue.equals("6")) {
  Intent intent = new Intent(context, Th.class);
  context.startActivity(intent);}
  else if(itemValue.equals("7")) {  
  Intent intent = new Intent(context, Ukr.class);
  context.startActivity(intent);}
  else if (itemValue.equals("8")){
  Intent intent = new Intent(context, Po.class);
  context.startActivity(intent);}
  else if (itemValue.equals("9")) { 
  Intent intent = new Intent(context, France.class);
  context.startActivity(intent);}
  else if (itemValue.equals("10")){
  Intent intent = new Intent(context, UK.class);
  context.startActivity(intent);}
  else if (itemValue.equals("11")) { 
  Intent intent = new Intent(context, Ksa.class);
  context.startActivity(intent);}
  else if (itemValue.equals("12"))  {
  Intent intent = new Intent(context, Ger.class);
  context.startActivity(intent);}
  else if (itemValue.equals("13"))  {
  Intent intent = new Intent(context, Canda.class);
  context.startActivity(intent);}
  else if (itemValue.equals("14")){
  Intent intent = new Intent(context, Turkey.class);
  context.startActivity(intent);}
  else if (itemValue.equals("15"))    {
  Intent intent = new Intent(context, Italy.class);
  context.startActivity(intent);}
  else if (itemValue.equals("16")) {
  Intent intent = new Intent(context, Russia.class);
  context.startActivity(intent);}
  else if (itemValue.equals("17")) {
  Intent intent = new Intent(context, China.class);
  context.startActivity(intent);}
  else if (itemValue.equals("18")) {
  Intent intent = new Intent(context, Usa.class);
  context.startActivity(intent);}
        })};}
  </code></pre>