title: intent.putExtra in adapter
body: <p>I have the adapter and want to send some values to another activity by <code>putExtra</code> Inside <code>setOnClickListener</code> Is there a way to do it.</p>
  
  <pre><code> HireMe.setOnClickListener(new View.OnClickListener() {
              public void onClick(View v) {
  
                  context.startActivity(new Intent(context, HireLater.class));
  
                 // intent.putExtra nameText &amp; subjectText
  
          }
      });
  
  }
  </code></pre>
  
  <p>My Adapter HierAdapter.java</p>
  
  <pre><code>public class HireAdapter extends ArrayAdapter&lt;HireItem&gt;{
  
  
  Context context;
  
  public HireAdapter(@NonNull Context context, @LayoutRes int resource, @NonNull List&lt;HireItem&gt; objects) {
      super(context, resource, objects);
      this.context = context;
  
  }
  
  @NonNull
  @Override
  public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
  
      if (convertView == null){
          convertView = ((Activity)getContext()).getLayoutInflater()
                  .inflate(R.layout.list_item_teachers,parent,false);
  
          Button HireMe = (Button) convertView.findViewById(R.id.hire_me);
          HireMe.setOnClickListener(new View.OnClickListener() {
              public void onClick(View v) {
  
                  context.startActivity(new Intent(context, HireLater.class));
  
                 // intent.putExtra nameText &amp; subjectText
  
          }
      });
  
  }
  
  
      HireItem teacherItem = getItem(position);
  
      TextView nameText = (TextView)convertView.findViewById(R.id.result_name);
      TextView subjectText = (TextView)convertView.findViewById(R.id.result_subject);
      TextView levelText = (TextView)convertView.findViewById(R.id.level);
      TextView mCity = (TextView)convertView.findViewById(R.id.result_city);
      TextView mContact = (TextView)convertView.findViewById(R.id.result_phone);
      TextView mQualification = (TextView)convertView.findViewById(R.id.Qua_teacher);
      TextView mSalary = (TextView)convertView.findViewById(R.id.salary);
      TextView mExperience = (TextView)convertView.findViewById(R.id.exTea);
  
      //
  
      nameText.setText(teacherItem.getResult_name());
      subjectText.setText(teacherItem.getResult_subject());
      levelText.setText(teacherItem.getResult_level());
      mCity.setText(teacherItem.getResult_city());
  
      //
      mContact.setText(teacherItem.getResult_mobile());
      mQualification.setText(teacherItem.getResult_qualification());
      mSalary.setText(teacherItem.getResult_salary());
      mExperience.setText(teacherItem.getResult_experince());
  
  
  
      return convertView;
  
  }}
  </code></pre>