Note that there are some explanatory texts on larger screens.

plurals
  1. POAnimation does not start in ListView items that are currently visible
    primarykey
    data
    text
    <p>I'm stuck, and I haven't been able to find a solution for this anywhere. :(</p> <p>I have an ImageView inside my Layout of each item of my ListView ( GridView ), provided by a BaseAdapter. When the Images are loaded and I assign the loaded BitmapDrawable to the ImageView using</p> <pre><code>imageView.setImageDrawable( newImage ); </code></pre> <p>the item pops up without any problems.</p> <p>BUT if I assign the new BitmapDrawable by using a TransitionDrawable OR by assigning a simple Animation:</p> <pre><code>//this is inoperative - animation will not start for currently displayed items! No solution found :( Animation a = LibResource.getResourceAnimation( activity, R.anim.fade_in ); imageView.setImageDrawable( newImage ); imageView.startAnimation( a ); </code></pre> <p>The Animation will not start for CURRENTLY DISPLAYED ITEMS of my GridView. If I scroll down the GridView and scroll it back to the mentioned item, the Image is shown and the Animation has been performed!</p> <p>I've already tried the following fixes:</p> <pre><code>imageView.invalidateDrawable( newImage ); imageView.invalidate(); </code></pre> <p>I've also tried the following Statements after assigning the Animation - Of course, I called them ON THE UI-Thread, AFTER assigning and starting the Animation ON THE UI-THREAD:</p> <pre><code>myGridView.invalidate(); myGridView.invalidateViews(); myGridView.getAdapter().notifyDataSetChanged(); </code></pre> <p>As mentioned, this problem only occurs FOR VISIBLE ITEMS in my ListView.</p> <p>Why does the Animation or TransitionDrawable not start, even after invoking invalidate() etc. on all involved views? </p> <p>The Problem occurs on my XPeria-Arc-S ( API-Level 10 ) and in the Android-Emulators API-Level 8,9,10.. Is this a bug in the Android System?</p> <p>Any help would be greatly appreciated!</p> <p>Thanks in advance</p> <p>Christopher</p> <hr> <p>Ok - Thanks for your quick reply.</p> <p>I got the Problem and after a lot of time of reorganizing my code structure for this to work, I came to the point that this did NOT solve my Problem :(.</p> <p>Beside this, it is NOT applicable or very practical for me to change contents in the creation of the view. Maybe you have any other Solutions regarding this issue?</p> <p>Sincerely</p> <p>Christopher</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. 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