Skip to content

Fix for the Interference between the search bar and the widget desktop.#381

Merged
TBog merged 3 commits into
TBog:masterfrom
lucasnasc2:master
Aug 22, 2023
Merged

Fix for the Interference between the search bar and the widget desktop.#381
TBog merged 3 commits into
TBog:masterfrom
lucasnasc2:master

Conversation

@lucasnasc2

Copy link
Copy Markdown
Contributor

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.

New animation feature for widget function and added delay to compensate for the hiding animation of the search bar. Removed the delay for the search bar animation to start.
@TBog

TBog commented Mar 5, 2023

Copy link
Copy Markdown
Owner

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.

@lucasnasc2

Copy link
Copy Markdown
Contributor Author

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

@TBog TBog merged commit 3cada91 into TBog:master Aug 22, 2023
@lucasnasc2

Copy link
Copy Markdown
Contributor Author

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?

@TBog

TBog commented Aug 22, 2023

Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants