coderJohnZhang / TvLauncher

A TV Launcher UI use ViewPager+CustomView as Main Frame, like win8 style, including several specially good effect CustomWidget, such as FlyBorderView, PosterView, ReflectView, RippleLayout, TextImageView and so on. Also it defines some animation effects and functional utils.
Apache License 2.0
118 stars 59 forks source link

你好,我把FlyBorderView加进代码为什么没有平移效果呢? #3

Closed fuyifang closed 6 years ago

fuyifang commented 7 years ago

参照你的代码直接 mFlyborderView.setFocusView(v, 1.15f);就可以了还是有其他地方没有加上?

fuyifang commented 7 years ago

` @Override public void onFocusChange(View v, boolean hasFocus) { if (hasFocus) {

        mFlyborderView.setVisibility(View.VISIBLE);
        mFlyborderView.setTvScreen(true);
        if (v.getId() == R.id.btn_item_recommend) {
            mFlyborderView.setFocusView(v, 1.15f);
            showOnFocusAnimation(v, 1.15f);
        } else {
            mFlyborderView.setFocusView(v, 1.20f);
            showOnFocusAnimation(v, 1.20f);
        }

    } else {
        mFlyborderView.setVisibility(View.INVISIBLE);
        if (v.getId() == R.id.btn_item_recommend) {
            showLoseFocusAnimation(v, 1.15f);
        } else {
            showLoseFocusAnimation(v, 1.20f);
        }

    }

}`
coderJohnZhang commented 6 years ago

这种效果实现有更好的方式,你在网上可以搜到。