arimorty / floatingsearchview

A search view that implements a floating search bar also known as persistent search
https://github.com/arimorty/floatingsearchview/blob/master/README.md
Apache License 2.0
3.54k stars 667 forks source link

Fix weird log #25

Closed saadfarooq closed 8 years ago

saadfarooq commented 8 years ago

I saw a weird log showing up in my LogCat and traced it on your repo to FloatingSearchView:1156

    int fiveDp = Util.dpToPx(6);
    int threeDp = Util.dpToPx(3);
    ViewCompat.animate(mSuggestionListContainer).cancel();
    float translationY = (-mSuggestionListContainer.getHeight())+getVisibleItemsHeight(newSearchSuggestions);

    Log.d("dfsdfsdff", translationY+"");
    //todo refactor go over and make more clear
    final float newTranslationY = (translationY+fiveDp)<0 ?
            newSearchSuggestions.size()==0 ? translationY : translationY+threeDp
            : -fiveDp;

I would make a PR but this seems like something you can change on your local development branch and it can be pushed whenever you push next. Doesn't seem troubling enough to hurry.

arimorty commented 8 years ago

I am probably going to start working on the lib again in the near future. I hope to clean that up then.

Thanks for pointing that out.