android.support.v4.widget.ExploreByTouchHelper Java Examples
The following examples show how to use
android.support.v4.widget.ExploreByTouchHelper.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MonthView.java From date_picker_converter with Apache License 2.0 | 5 votes |
public void clearFocusedVirtualView() { final int focusedVirtualView = getFocusedVirtualView(); if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) { getAccessibilityNodeProvider(MonthView.this).performAction( focusedVirtualView, AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS, null); } }
Example #2
Source File: ExploreByTouchHelperActivity.java From V.FlyoutTest with MIT License | 5 votes |
@Override protected int getVirtualViewAt(float x, float y) { // We also perform hit detection in onTouchEvent(), and we can // reuse that logic here. This will ensure consistency whether // accessibility is on or off. final int index = getItemIndexUnder(x, y); if (index == NO_ITEM) { return ExploreByTouchHelper.INVALID_ID; } return index; }
Example #3
Source File: MonthView.java From StyleableDateTimePicker with MIT License | 5 votes |
@Override protected int getVirtualViewAt(float x, float y) { final int day = getDayFromLocation(x, y); if (day >= 0) { return day; } return ExploreByTouchHelper.INVALID_ID; }
Example #4
Source File: MonthView.java From StyleableDateTimePicker with MIT License | 5 votes |
public void clearFocusedVirtualView() { final int focusedVirtualView = getFocusedVirtualView(); if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) { getAccessibilityNodeProvider(MonthView.this).performAction( focusedVirtualView, AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS, null); } }
Example #5
Source File: MonthView.java From AlarmOn with Apache License 2.0 | 5 votes |
@Override protected int getVirtualViewAt(float x, float y) { final int day = getDayFromLocation(x, y); if (day >= 0) { return day; } return ExploreByTouchHelper.INVALID_ID; }
Example #6
Source File: MonthView.java From AlarmOn with Apache License 2.0 | 5 votes |
public void clearFocusedVirtualView() { final int focusedVirtualView = getFocusedVirtualView(); if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) { getAccessibilityNodeProvider(MonthView.this).performAction( focusedVirtualView, AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS, null); } }
Example #7
Source File: SimpleMonthView.java From AppCompat-Extension-Library with Apache License 2.0 | 5 votes |
@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; }
Example #8
Source File: SimpleMonthView.java From SublimePicker with Apache License 2.0 | 5 votes |
@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; }
Example #9
Source File: MonthView.java From date_picker_converter with Apache License 2.0 | 5 votes |
@Override protected int getVirtualViewAt(float x, float y) { final int day = getDayFromLocation(x, y); if (day >= 0) { return day; } return ExploreByTouchHelper.INVALID_ID; }
Example #10
Source File: MonthView.java From AssistantBySDK with Apache License 2.0 | 5 votes |
public void clearFocusedVirtualView() { final int focusedVirtualView = getFocusedVirtualView(); if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) { getAccessibilityNodeProvider(MonthView.this).performAction( focusedVirtualView, AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS, null); } }
Example #11
Source File: MonthView.java From BottomSheetPickers with Apache License 2.0 | 5 votes |
@Override protected int getVirtualViewAt(float x, float y) { final int day = getDayFromLocation(x, y); if (day >= 0) { return day; } return ExploreByTouchHelper.INVALID_ID; }
Example #12
Source File: MonthView.java From BottomSheetPickers with Apache License 2.0 | 5 votes |
public void clearFocusedVirtualView() { final int focusedVirtualView = getFocusedVirtualView(); if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) { getAccessibilityNodeProvider(MonthView.this).performAction( focusedVirtualView, AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS, null); } }
Example #13
Source File: MonthView.java From narrate-android with Apache License 2.0 | 5 votes |
@Override protected int getVirtualViewAt(float x, float y) { final int day = getDayFromLocation(x, y); if (day >= 0) { return day; } return ExploreByTouchHelper.INVALID_ID; }
Example #14
Source File: MonthView.java From narrate-android with Apache License 2.0 | 5 votes |
public void clearFocusedVirtualView() { final int focusedVirtualView = getFocusedVirtualView(); if (focusedVirtualView != ExploreByTouchHelper.INVALID_ID) { getAccessibilityNodeProvider(MonthView.this).performAction( focusedVirtualView, AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS, null); } }
Example #15
Source File: SimpleMonthView.java From DateTimePicker with Apache License 2.0 | 5 votes |
@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; }
Example #16
Source File: TouchImageView.java From ImageEraser with GNU General Public License v3.0 | 5 votes |
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; } }
Example #17
Source File: MonthView.java From AssistantBySDK with Apache License 2.0 | 5 votes |
@Override protected int getVirtualViewAt(float x, float y) { final int day = getDayFromLocation(x, y); if (day >= 0) { return day; } return ExploreByTouchHelper.INVALID_ID; }