title: I want to start camera, onClick event used in item of Listview
body: <p>I want to start camera,  onClick event  used in item of Listview. but showing The method startActivity(Intent) is undefined for the type new View.OnClickListener(). my Adapter code is here.</p>
  
  <pre><code>public class MessageListAdapter extends ArrayAdapter&lt;RowItem1&gt; {
  
      Context context;
  
      public MessageListAdapter(Context context, int resourceId,
              List&lt;RowItem1&gt; items) {
          super(context, resourceId, items);
          this.context = context;
      }
  
      /*private view holder class*/
      private class ViewHolder {
          ImageView imagep ;
          TextView name;
          TextView date1;
          TextView time;
      }
  
      public View getView(int position, View convertView, ViewGroup parent) {
          ViewHolder holder = null;
          RowItem1 rowItem = getItem(position);
  
          LayoutInflater mInflater = (LayoutInflater) context
                  .getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
          if (convertView == null) {
              convertView = mInflater.inflate(R.layout.single_list_message, null);
              ImageView imgcamera= (ImageView) convertView.findViewById(R.id.img_camera);
             imgcamera.setOnClickListener(new OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
                      // TODO Auto-generated method stub
                      Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
                      startActivity(intent);
                  }
              });
  
              holder = new ViewHolder();
              holder.name = (TextView) convertView.findViewById(R.id.txt_name);
              holder.date1 = (TextView) convertView.findViewById(R.id.txt_Date);
              holder.time = (TextView) convertView.findViewById(R.id.txt_time);
              holder.imagep = (ImageView) convertView.findViewById(R.id.img_person);
              holder.imagecam = (ImageView) convertView.findViewById(R.id.img_camera);
  
              convertView.setTag(holder);
          } else
              holder = (ViewHolder) convertView.getTag();
  
          holder.name.setText(rowItem.getName());
          holder.date1.setText(rowItem.getDate1());
          holder.imagep.setImageResource(rowItem.getImagep());
          holder.imagecam.setImageResource(rowItem.getImagecam());
          holder.time.setText(rowItem.getTime());
          return convertView;
      }    
  }
  </code></pre>