Closed lucasnasc2 closed 1 year ago
What happens if you toggle between search and widget quickly? I'm guessing that the delayed handler will run on the wrong desktop. I'll test it out myself when I get back.
Man i just noticed, i could have used this in the animation part:
.setStartDelay(startDelay)
This is the delay part in the hideSearchBar() function, instead of using my previous approach to delay the widgets, we could just add this bit in the animation part.
What do you think?
Reference code:
mSearchBarContainer.animate()
.setStartDelay(startDelay)
.alpha(0f)
.translationY(translationY)
.setDuration(UI_ANIMATION_DURATION)
.setInterpolator(new AccelerateInterpolator())
.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
TBApplication.state().setSearchBar(LauncherState.AnimatedVisibility.ANIM_TO_HIDDEN);
}
@Override
public void onAnimationEnd(Animator animation) {
TBApplication.state().setSearchBar(LauncherState.AnimatedVisibility.HIDDEN);
mSearchBarContainer.setVisibility(View.GONE);
}
})
.start();
Omg thank you for merging it. When can i test it? I couldn't compile my modified version myself (some compilation error I didn't have time to fix) and completely forgot about it. Is an update coming to f-droid?
I don't know when Fdroid will compile and publish, but I did my part so that it will happen eventually. I also published on Playstore, but that's going to take time as well. If you want to test it now, get the GitHub release. Do note that the apk signing will differ from the FDroid apk.
I frankensteined together an animation for the showWidgets() function, added a delayed activation and removed the UI_ANIMATION_DELAY variable from the hideSearchBar() argument. I tested and it worked for me.