BasicSearchBarFragment.java 文件源码

java
阅读 38 收藏 0 点赞 0 评论 0

项目:Closet 作者:
/**
 * 搜索栏的回退逻辑
 *
 * @return
 */
private boolean reactionToSearchBack() {
    if (mShowSearchToolbar) {
        mShowSearchToolbar = false;
        KeyboardUtils.hideSoftInput(mEdSearch, getContext());

        View childView = mRevealFrameLayout.getChildAt(0);
        childView.bringToFront();

        int centerX = childView.getLeft();
        int centerY = childView.getBottom() / 2;
        Animator circularReveal = ViewAnimationUtils.createCircularReveal(childView, centerX, centerY, 0, childView.getWidth());
        circularReveal.setDuration(300).setInterpolator(new DecelerateInterpolator());

        circularReveal.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                super.onAnimationEnd(animation);
                reactionToCover(false);
            }
        });
        circularReveal.start();

        if (mEdSearch != null) {
            mEdSearch.setText("");
            mSearchWord = "";
            fetchSearchData(mSearchWord);
        }

        return true;
    }
    return false;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号