title: create android battery widget animated when charging
body: <p>I want to create battery animated widget when battery is charging.I want to show some images continuously.
  I use an <code>ImageView</code> like below:</p>
  
  <pre><code> &lt;ImageView 
              android:id="@+id/batterycharging_anim"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:gravity="center"
              android:layout_centerHorizontal="true"
              android:src="@anim/batterycharging" /&gt;
  </code></pre>
  
  <p>and batterycharging anim file is like below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;animation-list
      android:oneshot="false"
      xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;item android:drawable="@drawable/battery_c_10" android:duration="25" /&gt;
      &lt;item android:drawable="@drawable/battery_c_20" android:duration="25" /&gt;
      &lt;item android:drawable="@drawable/battery_c_30" android:duration="25" /&gt;
      &lt;item android:drawable="@drawable/battery_c_40" android:duration="25" /&gt;
      &lt;item android:drawable="@drawable/battery_c_50" android:duration="25" /&gt;
      &lt;item android:drawable="@drawable/battery_c_60" android:duration="25" /&gt;
      &lt;item android:drawable="@drawable/battery_c_70" android:duration="25" /&gt;
      &lt;item android:drawable="@drawable/battery_c_80" android:duration="25" /&gt;
      &lt;item android:drawable="@drawable/battery_c_90" android:duration="25" /&gt;
      &lt;item android:drawable="@drawable/battery_c_100" android:duration="25" /&gt;
  &lt;/animation-list&gt;
  </code></pre>
  
  <p>and here is my method for updating widget:</p>
  
  <pre><code>private RemoteViews buildUpdate(Context context)
      {
          RemoteViews widgetView  = new RemoteViews(this.getPackageName(), R.layout.batterywidget_layout);
  
          if(status== BatteryManager.BATTERY_STATUS_CHARGING)
          {
  
  
          }
      }
  </code></pre>
  
  <p>what should i do next? what should i put in if block??</p>