XML Animation List Duration not working

Click For Summary

Discussion Overview

The discussion revolves around an issue with an XML animation list in Android, specifically regarding the duration of an animation for a border around an image view. Participants are exploring why the border does not disappear after the intended duration of 2 seconds.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant notes that the duration is set to 200 milliseconds instead of the intended 2000 milliseconds, which may be causing the border to not disappear as expected.
  • Another participant suggests that additional items might be needed in the animation list and questions whether the box is expected to disappear after the animation completes.
  • There is a suggestion that the code might not be using the standard of milliseconds, raising the possibility that it could be interpreted as 200 seconds instead.
  • A later reply confirms that the duration is indeed in milliseconds, referencing documentation for clarification.

Areas of Agreement / Disagreement

Participants express uncertainty about the correct interpretation of the duration setting and whether additional items are necessary in the animation list. There is no consensus on the solution to the problem presented.

Contextual Notes

There are unresolved assumptions regarding the expected behavior of the animation list and the interpretation of the duration value.

whitehorsey
Messages
188
Reaction score
0
I am creating a border for an image view using xml. This is what I have:

<animation-list xmlns:android="http://schemas.android.com/apk/res/android" >

<item android:duration="200">
<shape
android:shape="rectangle" >
<stroke
android:width="5dp"
android:color="#FF0000" />
<solid android:color="#000099" />
</shape>
</item>
</animation-list>

The border shows up but it stays with the imageview and does not disappear. I want it to disappear after 2 seconds. What is wrong?
 
Last edited by a moderator:
Technology news on Phys.org
I'm sorry you are not generating any responses at the moment. Is there any additional information you can share with us? Any new findings?
 
A problem is that you are specifying 200 instead of 2000 msec.
I have never programmed an android, but just as a guess, do you need additional items in your animation list?
Are you expecting the box to disappear once your list is complete?
 
.Scott said:
A problem is that you are specifying 200 instead of 2000 msec.
I have never programmed an android, but just as a guess, do you need additional items in your animation list?
Are you expecting the box to disappear once your list is complete?
Unless the code isn't using the standard of milliseconds. Maybe it's waiting 200 seconds (3 1/2 minutes) to go away.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 2 ·
Replies
2
Views
10K