title: Switch statement Android
body: <p>I have a problem with my switch statement. When i try to select an item from a list it is executing automaticly the last case of the switch statement. Here is my code:</p>
  
  <p><strong>CustomAdapter.java</strong>    </p>
  
  <pre><code>@Override
   public View getView(final int position, View convertView, ViewGroup parent) {
      // TODO Auto-generated method stub
      Holder holder=new Holder();
      View rowView;        
           rowView = inflater.inflate(R.layout.list_field, null);
           holder.tv2=(TextView) rowView.findViewById(R.id.textView2);
           holder.tv=(TextView) rowView.findViewById(R.id.titleView);
           holder.img=(ImageView) rowView.findViewById(R.id.imageView1);
  
       holder.tv2.setText(description[position]);
       holder.tv.setText(result[position]);
       holder.img.setImageResource(imageId[position]);
  
       rowView.setOnClickListener(new View.OnClickListener() {
  
           @Override
           public void onClick(View v) {
  
              Intent intent = new Intent(context, Lesson.class); 
  
              switch(position){                                                     
                  case 0: intent.putExtra("Title", l1);                   
                  case 1: intent.putExtra("Title", l2);                   
                  case 2: intent.putExtra("Title", l3);                   
                  case 3: intent.putExtra("Title", l4);                   
                  case 4: intent.putExtra("Title", l5);                   
                  case 5: intent.putExtra("Title", l6);                   
                  case 6: intent.putExtra("Title", l7);                   
                  case 7: intent.putExtra("Title", l8);                   
                  case 8: intent.putExtra("Title", l9);                   
                  case 9: intent.putExtra("Title", l10);
  
                  context.startActivity(intent);          
              }                  
           }
      });
  </code></pre>