title: How to Create PopUp Window in Custom adapter class?
body: <p>I searched so many sites for creating popUp window but i did not get proper solution for create popup Window in Custom Adapter class, i find only for creating popUp Window in Activity class.</p>
  
  <p>My problem is i am using Custom Adapter class extends ArrayAdapter, in that i have a TextView in row.xml file adapted for ArrayList. when i click that textview i want to show popUp window at the cursor point location.</p>
  
  <p>Here is my code :</p>
  
  <pre><code>Clockin_Adapter adap = new Clockin_Adapter(getApplicationContext(), R.layout.group_clkin_row, result);
              clockin.setAdapter(adap);
  
  public static class Clockin_Adapter extends ArrayAdapter&lt;DataItem&gt; {
  
          ArrayList&lt;DataItem&gt; items;
          Context con;
          int[] buttonStates;
          Time t ;
  
          public Clockin_Adapter(Context context, int textViewResourceId, ArrayList&lt;DataItem&gt; objects) {
              super(context, textViewResourceId, objects);
              this.con = context;
              this.items = objects;
  
              buttonStates=new int[objects.size()];
              for(int i=0;i&lt;objects.size();i++)
              {
              buttonStates[i]=0;
              }
          }
          @Override
          public int getCount() {         
  
               if(employeeList==null){
                      return 0;
                  }
                  else{
                      return employeeList.length;
                  }
  
          }
  
          @Override
          public long getItemId(int position) {           
              return 0;
          }
          @Override
          public View getView(final int position, View convertView, ViewGroup parent) {
  
              View row = convertView;
              final ViewHolder holder;
              if (convertView == null) {
              row = LayoutInflater.from(parent.getContext()).inflate(R.layout.group_clkin_row, null);
              holder=new ViewHolder();
              } else {
                  //code
  
                  }
  
              }
  
                  holder.name = (TextView)row.findViewById(R.id.group_name);
  
                  holder.name.setText(item.getName());
                  holder.name.setOnClickListener(new OnClickListener() {
  
                      @Override
                      public void onClick(View v) {
  
  
                          //Need PopUp window Here
  
                      }
                  });
  
  static class ViewHolder {
          TextView name;
          TextView time;
  
          }
  
  
  please give me solution.
  
  
  Thanks in advanced.
  </code></pre>