-
Notifications
You must be signed in to change notification settings - Fork 2
Hidden State으로 전환될 때 Animation 추가 #22
Conversation
…동 후 숨김처리할 수 있도록 변경
딜레이를 넣은 것 외에도 다른 코드가 보이는데, 어떤 작업들이 진행된 것인가요? |
Hidden State으로 상태가 바뀔때 기존에는 버튼이 사라지기만 했었는데, 정해진 위치로 이동하는 애니메이션을 추가했습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 입니다!
final PositionDock positionToHide = mHoverView.getPositionToHide(); | ||
if (positionToHide == null) { | ||
mHoverView.setVisibility(View.GONE); | ||
onStateChanged.run(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 코드를 잘 모르는데, onStateChanged가 Null일 가능성은 없을까요?
if (!hasControl() || !mHoverView.mIsAddedToWindow) { | ||
return; | ||
} | ||
onStateChanged.run(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도, onStateChanged가 Null일 가능성은 없을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM입니다. NPE 가능성이 없는지만 한 번 더 확인 부탁드립니다.
onStateChanged의 경우, Hidden state으로 전환될때마다 객체를 생성해서 넘겨주고 있어서 null일 경우가 없어보입니다! |
HiddenState로 state가 전환될 때, onStateChanged listener를 호출 한 후 바로 view의 visibility를 바꿀 경우 버튼이 깜빡거리는듯한 느낌을 주게됩니다. 그래서 handler를 사용해 약간의 딜레이를 넣었습니다.