Skip to content
This repository was archived by the owner on Feb 9, 2023. It is now read-only.

Conversation

josh-yun
Copy link

HiddenState로 state가 전환될 때, onStateChanged listener를 호출 한 후 바로 view의 visibility를 바꿀 경우 버튼이 깜빡거리는듯한 느낌을 주게됩니다. 그래서 handler를 사용해 약간의 딜레이를 넣었습니다.

@josh-yun josh-yun requested review from ybbarng and SeoJungHong March 19, 2019 01:37
@ybbarng
Copy link

ybbarng commented Mar 19, 2019

딜레이를 넣은 것 외에도 다른 코드가 보이는데, 어떤 작업들이 진행된 것인가요?

@josh-yun
Copy link
Author

Hidden State으로 상태가 바뀔때 기존에는 버튼이 사라지기만 했었는데, 정해진 위치로 이동하는 애니메이션을 추가했습니다.

Copy link

@SeoJungHong SeoJungHong left a 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();
Copy link

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();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도, onStateChanged가 Null일 가능성은 없을까요?

Copy link

@ybbarng ybbarng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM입니다. NPE 가능성이 없는지만 한 번 더 확인 부탁드립니다.

@josh-yun
Copy link
Author

onStateChanged의 경우, Hidden state으로 전환될때마다 객체를 생성해서 넘겨주고 있어서 null일 경우가 없어보입니다!

@josh-yun josh-yun merged commit 78d0d3e into master Mar 20, 2019
@delete-merged-branch delete-merged-branch bot deleted the feature/hidden_state_animation_support branch March 20, 2019 05:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants