Skip to content

Commit

Permalink
判断为空
Browse files Browse the repository at this point in the history
  • Loading branch information
evilbinary committed Mar 27, 2016
1 parent 55cb293 commit 21ba531
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/src/main/java/org/evilbinary/tv/widget/BorderEffect.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ public void onFocusChanged(View oldFocus, View newFocus) {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
newFocus = view;

newFocus.bringToFront();

int w = view.getMeasuredWidth();
int h = view.getMeasuredHeight();
int ww = View.MeasureSpec.makeMeasureSpec(w, View.MeasureSpec.AT_MOST);
Expand Down Expand Up @@ -269,7 +267,7 @@ private VisibleScope checkVisibleScope(View oldFocus, View newFocus) {
scope.oldFocus = oldFocus;
scope.newFocus = newFocus;
scope.isVisible = true;
if (oldFocus != null) {
if (oldFocus != null&&newFocus!=null) {
if (oldFocus.getParent() != newFocus.getParent()) {
Log.d(TAG, "=====>" + attacheViews.indexOf(newFocus.getParent()) + "=" + attacheViews.indexOf(oldFocus.getParent()));

Expand Down

0 comments on commit 21ba531

Please sign in to comment.