Skip to content

Commit 21ba531

Browse files
committed
判断为空
1 parent 55cb293 commit 21ba531

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/src/main/java/org/evilbinary/tv/widget/BorderEffect.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ public void onFocusChanged(View oldFocus, View newFocus) {
117117
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
118118
newFocus = view;
119119

120-
newFocus.bringToFront();
121-
122120
int w = view.getMeasuredWidth();
123121
int h = view.getMeasuredHeight();
124122
int ww = View.MeasureSpec.makeMeasureSpec(w, View.MeasureSpec.AT_MOST);
@@ -269,7 +267,7 @@ private VisibleScope checkVisibleScope(View oldFocus, View newFocus) {
269267
scope.oldFocus = oldFocus;
270268
scope.newFocus = newFocus;
271269
scope.isVisible = true;
272-
if (oldFocus != null) {
270+
if (oldFocus != null&&newFocus!=null) {
273271
if (oldFocus.getParent() != newFocus.getParent()) {
274272
Log.d(TAG, "=====>" + attacheViews.indexOf(newFocus.getParent()) + "=" + attacheViews.indexOf(oldFocus.getParent()));
275273

0 commit comments

Comments
 (0)