title: How to set a custom progress bar visibility state during an AppWidget update
body: <p>Good day, ok, so i have no idea what am doing wrong here again. i wanted to show an AnimatedDrawable on my progressbar when updating my Appwidget and when i finish updating, i want the progress bar to become invisible. I know you have to embed the progress bar in a linearlayout or framelayout and call SetVisibility method of the remoteView on the layout. However, it doesn't seem to work. The progressbar keeps being visible and i don't know how to hide it anymore. what can i do?</p>
  
  <p>to keep it short, i have a code like this to update the progressbar from the remoteview, i have intentionally left the comments there so you know what i have tried:</p>
  
  <pre><code>remoteView.setViewVisibility(R.id.linear_progressbar_container, View.INVISIBLE);
      animateProgressBar(remoteView);
  
  
  private RemoteViews animateProgressBar(RemoteViews remoteView) {
           Resources res = context.getResources();
  //AnimationDrawable drawable = (AnimationDrawable)res.getDrawable(R.drawable.my_animation);
           //drawable.setOneShot(false);
           //drawable.start();
  
           //remoteView.setProgressBar(R.id.progress_widget_id, 0, 0, true);
  
           Log.d(TAG, "calling setview indeterminate");
         remoteView.setViewVisibility(R.id.linear_progressbar_container, View.INVISIBLE);
  
              return remoteView;
          }
  </code></pre>
  
  <p>and in my xml layout, i have this portion with the progress bar, this is inside a relative layout which is the root with other textviews in it:</p>
  
  <pre><code>&lt;LinearLayout 
          android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_toRightOf="@id/city_id"
      android:layout_alignBaseline="@id/image_id"
      android:layout_alignTop="@id/image_id"
      android:layout_marginLeft="30dp"
      android:paddingTop="10dp"
      android:layout_centerInParent="true"
      android:id="@+id/linear_progressbar_container"&gt;    
  
          &lt;ProgressBar
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
      android:id="@+id/progress_widget_id"&gt;    
          &lt;/ProgressBar&gt;     
  
          &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>the drawable my_animation.xml: </p>
  
  <pre><code> &lt;animation-list xmlns:android="http://schemas.android.com/apk/res/android" 
          android:visible="false" android:oneshot="true"&gt;
  
       &lt;item android:drawable="@drawable/wheel1" android:duration="50" /&gt;
       &lt;item android:drawable="@drawable/wheel2" android:duration="50" /&gt;
       &lt;item android:drawable="@drawable/wheel3" android:duration="50" /&gt;
       &lt;item android:drawable="@drawable/wheel4" android:duration="50" /&gt;
       &lt;item android:drawable="@drawable/wheel5" android:duration="50" /&gt;"
  
      &lt;/animation-list&gt;
  </code></pre>
  
  <p>please help.. :(  how do i make this progress bar become visible and invisible during and after i update my AppWidget respectively? Thank you for the time and all your help.</p>
  
  <p>Note: I do all widget updating via a service.</p>