Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right clear button jumps when menu is present #269

Open
shifatul-i opened this issue Aug 3, 2017 · 1 comment
Open

Right clear button jumps when menu is present #269

shifatul-i opened this issue Aug 3, 2017 · 1 comment

Comments

@shifatul-i
Copy link

shifatul-i commented Aug 3, 2017

As you can see (in the attached gif) the right clear (cross) button jumps (no animation)
It looks really wired on a physical device.

My "onFocus" code looks like this

mSearchView.setOnFocusChangeListener(new FloatingSearchView.OnFocusChangeListener() {
    @Override
    public void onFocus() {
        // Demo Suggestions
        List<SearchResult> myList = new ArrayList<>();
        myList.add(new SearchResult(true, "", "Game"));
        myList.add(new SearchResult(true, "", "movie"));
        myList.add(new SearchResult(true, "", "Search result"));
        myList.add(new SearchResult(true, "", "New result"));
        mSearchView.swapSuggestions(myList);

        // so the user can edit their last query
        if (!TextUtils.isEmpty(mLastQuery)) mSearchView.setSearchText(mLastQuery);
    }
});

test

@jbhv12
Copy link

jbhv12 commented Sep 20, 2017

I found a quick and dirty workaround for this problem. I modified the code in library. In FloatingSearchView.java there is function called public void hideIfRoomItems(boolean withAnim). Now I just added line withAnim = false; and set it false for all cases. Now this isn't exactly a solution but it's a quick workaround.

Hope this helps.

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

No branches or pull requests

2 participants