안드로이드 개발 질문/답변
(글 수 45,052)
오늘의 두번째 질문이에요 ㅠ.ㅠ
scrollview를 아래의 소스와 같이 scaleAnimation을 이용하여 확대 하였습니다.
그랬더니, scrollview안의 view들이 잘 확대 되었습니다.
그러나, 맨위와 맨 아래의 view들이 짤렸습니다.
아마도, scrollview의 내부 변수 값들이 그대로여서,
scrollview 내부의 높이가 확대 된 만큼 커지지 않은 것 처럼 보입니다.
어떻게 해야 할까요?
ㅠ.ㅠ
ScaleAnimation scaleAni = new ScaleAnimation(1.0f, 1.2f, 1.0f, 1.2f
, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
scaleAni.setDuration(1500);
scaleAni.setStartOffset(200);
scaleAni.setFillAfter(true);
scaleAni.setInterpolator( new AccelerateInterpolator() );
scaleAni.setAnimationListener( new AnimationListener() {
public void onAnimationStart(Animation animation) {}
public void onAnimationEnd(Animation animation) {}
public void onAnimationRepeat(Animation animation) {}
} );
m_coverScroll.setAnimation(scaleAni);




휴.. 자답 입니다....
임시 방편으로, 저의 경우 linearLayout이 scrollview안에 있습니다.
liearlayout 안에 가상의 view를 맨앞과 맨뒤에 넣었습니다. 그렇게 하니 짤리지 않네요.
대신에 scroll의 위치를 좀 계산해야 할 것 같습니다.
scaleAnimation에서 scrollview가 확대 되었을 때의 임시 방편의 처리 입니다 ㅠ.ㅠ