Java 类android.support.v4.widget.ExploreByTouchHelper 实例源码

项目:material-components-android    文件:Chip.java   
private boolean moveFocus(boolean positive) {
  ensureFocus();
  boolean focusChanged = false;
  if (positive) {
    if (focusedVirtualView == ExploreByTouchHelper.HOST_ID) {
      setFocusedVirtualView(CLOSE_ICON_VIRTUAL_ID);
      focusChanged = true;
    }
  } else {
    if (focusedVirtualView == CLOSE_ICON_VIRTUAL_ID) {
      setFocusedVirtualView(ExploreByTouchHelper.HOST_ID);
      focusChanged = true;
    }
  }
  return focusChanged;
}
项目:AssistantBySDK    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:AssistantBySDK    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:ImageMagnifier    文件:TouchImageView.java   
private int setViewSize(int mode, int size, int drawableWidth) {
    switch (mode) {
        case ExploreByTouchHelper.INVALID_ID /*-2147483648*/:
            return Math.min(drawableWidth, size);
        case 0 /*0*/:
            return drawableWidth;
        case 1073741824:
            return size;
        default:
            return size;
    }
}
项目:ImageEraser    文件:TouchImageView.java   
private int setViewSize(int mode, int size, int drawableWidth) {
    switch (mode) {
        case ExploreByTouchHelper.INVALID_ID /*-2147483648*/:
            return Math.min(drawableWidth, size);
        case 0 /*0*/:
            return drawableWidth;
        case 1073741824:
            return size;
        default:
            return size;
    }
}
项目:DateTimePicker    文件:SimpleMonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayAtLocation((int) (x + 0.5f), (int) (y + 0.5f));
    if (day != -1) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:PersianAndroidDateTimePicker    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:PersianAndroidDateTimePicker    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:IIFYM    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:IIFYM    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:narrate-android    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:narrate-android    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:MaterialDateTimePicker    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:MaterialDateTimePicker    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:CheckSmarter    文件:SimpleMonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayAtLocation((int) (x + 0.5f), (int) (y + 0.5f));
    if (day != -1) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:BottomSheetPickers    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:BottomSheetPickers    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:material-components-android    文件:Chip.java   
@Override
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
  if (focused) {
    // If we've gained focus from another view, always focus the chip first.
    setFocusedVirtualView(ExploreByTouchHelper.HOST_ID);
  } else {
    setFocusedVirtualView(ExploreByTouchHelper.INVALID_ID);
  }
  invalidate();

  super.onFocusChanged(focused, direction, previouslyFocusedRect);
}
项目:Doctor    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:Doctor    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:SublimePicker    文件:SimpleMonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayAtLocation((int) (x + 0.5f), (int) (y + 0.5f));
    if (day != -1) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:SmoothDateRangePicker    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:SmoothDateRangePicker    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:TodayThing    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:TodayThing    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:HijriDatePicker    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:HijriDatePicker    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:HijriDatePicker    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:HijriDatePicker    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:AppCompat-Extension-Library    文件:SimpleMonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayAtLocation((int) (x + 0.5f), (int) (y + 0.5f));
    if (day != -1) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:material-calendar-datepicker    文件:MonthView.java   
public void clearFocusedVirtualView() {
  final int focusedVirtualView = getFocusedVirtualView();
  if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
    getAccessibilityNodeProvider(
        MonthView.this).performAction(
        focusedVirtualView,
        AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
        null);
  }
}
项目:material-calendar-datepicker    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
  final int day = getDayFromLocation(x, y);
  if (day >= 0) {
    return day;
  }
  return ExploreByTouchHelper.INVALID_ID;
}
项目:AlarmOn    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:AlarmOn    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:MaterialDateRangePicker    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:MaterialDateRangePicker    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:datetimepicker-android    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:datetimepicker-android    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}
项目:Cthulhator    文件:MonthView.java   
public void clearFocusedVirtualView() {
    final int focusedVirtualView = getFocusedVirtualView();
    if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) {
        getAccessibilityNodeProvider(MonthView.this).performAction(
                focusedVirtualView,
                AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS,
                null);
    }
}
项目:Cthulhator    文件:MonthView.java   
@Override
protected int getVirtualViewAt(float x, float y) {
    final int day = getDayFromLocation(x, y);
    if (day >= 0) {
        return day;
    }
    return ExploreByTouchHelper.INVALID_ID;
}