레이블이 property animation인 게시물을 표시합니다. 모든 게시물 표시
레이블이 property animation인 게시물을 표시합니다. 모든 게시물 표시

2013년 6월 10일 월요일

Android Property Animation bug.

이전 블로그에서 이전 함 (원본 글 2013/06/10 작성)

Android View Animation을 만들고 있는데
set 관련해서 좀 버그가 있나 보다..

일단 확인한것은 

1. set 관련 attribute가 정상적으로 동작이 안되는 것 같음..


19down voteaccepted
To expand upon answers by Pavel and others: it is true that the <set> tag is ridiculously buggy. It can't deal correctly with repeatCount and a number of other attributes.
I spent a few hours figuring out what it can and can't deal with and have submitted a bug report/issue here: Issue 17662
In summary (this concerns AnimationSets):
setRepeatCount() / android:repeatCountThis attribute (as well as repeatMode) does not work in code or XML. This makes repeating an entire set of animations difficult.
setDuration() / android:durationSetting this on an AnimationSet in code WORKS (overrides all durations of children animations), but not when included in the tag in XML
setFillAfter() / android:fillAfterThis works in both code and XML for the tag. Strangely I have gotten it to also work without the need to set fillEnabled to true.
setFillBefore() / android:fillBeforeSeems to have no effect/ignored in both code and XML
setFillEnabled() / android:fillEnabledSeems to have no effect/ignored in both code and XML. I can still get fillAfter to work even without including fillEnabled or setting fillEnabled to false.
setStartOffset() / android:startOffsetThis works only in code and not XML.
share|improve this answer

2013년 5월 아직도 안된다는 답글



2. Animation이 끝나는 시점과 불리는 callback 호출이 좀 문제가 있는 것 같다.

image widget에 대해서 setVisibility는 잘 먹는데 LinearLayout에는 먹질 않아서
clearAnimation()을 호출함.


For me calling clearAnimation of the View fixed the problem. In my case I wanted to set the View back to its original position after doing a translation with fillAfter set to true.
share|improve this answer
1 
I was having this problem and can confirm that clearAnimation does the trick. – Christopher Perry Aug 23 '12 at 5:01


뭐.. 내가 코드를 잘못 짰을 수도 있지..

2013년 5월 30일 목요일

Android Property Animation

이전 블로그에서 이전 함 (원본 글 2013/05/30 작성)

특정 widget에 animation 효과를 주는 방법이 필요 했었는데
아래와 같이 간단한 방법(Property Animation)이 있었다.



Animation

The Android framework provides two animation systems: property animation (introduced in Android 3.0) and view animation. Both animation systems are viable options, but the property animation system, in general, is the preferred method to use, because it is more flexible and offers more features. In addition to these two systems, you can utilize Drawable animation, which allows you to load drawable resources and display them one frame after another.
Property Animation
Introduced in Android 3.0 (API level 11), the property animation system lets you animate properties of any object, including ones that are not rendered to the screen. The system is extensible and lets you animate properties of custom types as well.
View Animation
View Animation is the older system and can only be used for Views. It is relatively easy to setup and offers enough capabilities to meet many application's needs.
<dt style="color: rgb(34, 34, 34); font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; background-color: rgb(249, 249, 249);">Drawable Animation</dt><dd style="margin: 0px 0px 10px 30px; color: rgb(34, 34, 34); font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; background-color: rgb(249, 249, 249);">Drawable animation involves displaying Drawable resources one after another, like a roll of film. This method of animation is useful if you want to animate things that are easier to represent with Drawable resources, such as a progression of bitmaps.</dd>


Property Animation 예제 따라하기




Property 설명

http://underclub.tistory.com/351


안드로이드 API Demo 중에서 Layout Animation를 참고하는 것을 추천.