title: How to access a Layout item in a parent from child?
body: <p>I have the following parent xml</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/list_places_linearLayout" &gt;
  
      &lt;LinearLayout
          android:id="@+id/loadingPanel"
          style="@style/GenericProgressBackground" &gt;
  
          &lt;ProgressBar style="@style/GenericProgressIndicator" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;com.example.ListView
          android:id="@+id/bottomactionbar"
          style="@style/BottomActionBar" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The com.example.ListView is my custom component that contains an AsyncTask. When this task is completed, I wanted to set the parent's ProgressBar visibility to GONE.</p>
  
  <p>So, when AsyncTask in child component is done, I try the following:</p>
  
  <pre><code>LinearLayout llParent = (LinearLayout)getParent();
  
  ((LinearLayout)llParent.findViewById(R.id.loadingPanel)).setVisibility(View.GONE);
  </code></pre>
  
  <p>Unfortunately the line llParent.findViewById(R.id.loadingPanel) is null... any chances I can overcome this issue?</p>
  
  <p>Thanks,
  Felipe</p>