Closed fuyifang closed 6 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);
}
}
}`
这种效果实现有更好的方式,你在网上可以搜到。
参照你的代码直接 mFlyborderView.setFocusView(v, 1.15f);就可以了还是有其他地方没有加上?