title: Android how to get an ancestor view from a child view?
body: <p>I have a list of type <code>Foo</code> with a custom array Adapter. I want to be able to click on a child element in one of the views in the array adapter and get back the view I clicked on of type <code>Foo</code>.</p>
  
  <p>This is how I am clicking on a child element:</p>
  
  <pre><code>// fill array with a test set of objects
  final ArrayList&lt;Foo&gt; locations = Foo.getTestingList();
  
  final myCustomArrayAdapter adapter = new myCustomArrayAdapter(rootView.getContext(), myarrayList);
           adapter.setDefaultRequestBtnClickListener(new View.OnClickListener(){
               @Override
               public void onClick(View v){
                      //if child element is clicked
                      if(v.getId() == R.id.deleteBTN){
                          //tag is set to the position in my custom adapter
                          int pos = (Integer)v.getTag();
  
                         //Get this child's parent view (type foo)
  
  
                      }
  
               }
           });
  </code></pre>
  
  <p>I want to be able to use certain <code>Foo</code> methods on the <code>Foo</code>parent of the child View I just clicked on.</p>