Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's a bit hard to tell the transition you are trying to attempt between those two images. So you want to start with the B/W image, but does it transition from B/W to Color by cross-fading, or do you slowly want to apply pieces of the color image from the bottom up over the B/W piece?</p> <p>If the latter is your choice, then your actual image will comprise of two drawables together inside a <code>&lt;layer-list&gt;</code>. One static, and the other representing a <code>ClipDrawable</code> that will reveal a portion of the color image based on its level value. For example, create an XML file:</p> <p><strong>res/drawable/progress_background.xml</strong></p> <pre><code>&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;item&gt; &lt;bitmap android:src="@drawable/ic_launcher_bw"/&gt; &lt;/item&gt; &lt;item&gt; &lt;clip android:clipOrientation="vertical" android:gravity="bottom" android:drawable="@drawable/ic_launcher"/&gt; &lt;/item&gt; &lt;/layer-list&gt; </code></pre> <p>Then set that <code>Drawable</code> on something like an <code>ImageView</code> to display the progress, and change the value with calls to <code>setLevel()</code>, i.e.</p> <pre><code>//This is any view subclass that you have chosen to do this ImageView progress; progress.setImageResource(R.drawable.progress_background); //Adjust the progress by adjusting the drawable's level progress.setImageLevel(500); // -- OR -- progress.getDrawable().setLevel(500); </code></pre> <p>Drawable levels are set by default from 0 to 10,000 to represent fully clipped to fully revealed.</p> <p>HTH</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload