android.view.accessibility.AccessibilityRecord Java Examples
The following examples show how to use
android.view.accessibility.AccessibilityRecord.
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: peService.java From styT with Apache License 2.0 | 6 votes |
/** * 描述:验证是否现在是在聊天页面,可以进行抢红包处理 * 作者:卜俊文 * 邮箱:[email protected] * 日期:2017/11/3 上午11:52 * * @param event */ public boolean invalidEnvelopeUi(AccessibilityEvent event) { //判断类名是否是聊天页面 if (!QQConstant.QQ_IM_CHAT_ACTIVITY.equals(event.getClassName().toString())) { return true; } //判断页面中的元素是否有点击拆开的文本,有就返回可以进行查询了 int recordCount = event.getRecordCount(); if (recordCount > 0) { for (int i = 0; i < recordCount; i++) { AccessibilityRecord record = event.getRecord(i); if (record == null) { break; } List<CharSequence> text = record.getText(); if (text != null && text.size() > 0 && text.contains(QQConstant.QQ_CLICK_TAKE_APART)) { //如果文本中有点击拆开的字眼,就返回可以进行查询了 return true; } } } return false; }
Example #2
Source File: OversecAccessibilityService.java From oversec with GNU General Public License v3.0 | 5 votes |
private static String recordToString(AccessibilityRecord record) { StringBuilder builder = new StringBuilder(); builder.append(" [ ClassName: " + record.getClassName()); builder.append("; \tText: " + record.getText()); builder.append("; \tContentDescription: " + record.getContentDescription()); builder.append("; \tItemCount: " + record.getItemCount()); builder.append("; \tCurrentItemIndex: " + record.getCurrentItemIndex()); builder.append("; \tIsEnabled: " + record.isEnabled()); builder.append("; \tIsPassword: " + record.isPassword()); builder.append("; \tIsChecked: " + record.isChecked()); builder.append("; \tIsFullScreen: " + record.isFullScreen()); builder.append("; \tScrollable: " + record.isScrollable()); builder.append("; \tBeforeText: " + record.getBeforeText()); builder.append("; \tFromIndex: " + record.getFromIndex()); builder.append("; \tToIndex: " + record.getToIndex()); builder.append("; \tScrollX: " + record.getScrollX()); builder.append("; \tScrollY: " + record.getScrollY()); builder.append("; \tAddedCount: " + record.getAddedCount()); builder.append("; \tRemovedCount: " + record.getRemovedCount()); builder.append("; \tParcelableData: " + record.getParcelableData()); AccessibilityNodeInfo source = record.getSource(); builder.append("; \n\tsource: " + (source == null ? "NULL" : source.hashCode())); builder.append(" ]"); if (source != null) { source.recycle(); } return builder.toString(); }
Example #3
Source File: AccessibilityRecordCompatIcs.java From guideshow with MIT License | 4 votes |
public static void setItemCount(Object record, int itemCount) { ((AccessibilityRecord) record).setItemCount(itemCount); }
Example #4
Source File: AccessibilityRecordCompatIcs.java From V.FlyoutTest with MIT License | 4 votes |
public static void setFullScreen(Object record, boolean isFullScreen) { ((AccessibilityRecord) record).setFullScreen(isFullScreen); }
Example #5
Source File: AccessibilityRecordCompatIcs.java From adt-leanback-support with Apache License 2.0 | 4 votes |
public static void setScrollable(Object record, boolean scrollable) { ((AccessibilityRecord) record).setScrollable(scrollable); }
Example #6
Source File: AccessibilityRecordCompatIcs.java From guideshow with MIT License | 4 votes |
public static int getFromIndex(Object record) { return ((AccessibilityRecord) record).getFromIndex(); }
Example #7
Source File: AccessibilityRecordCompatIcs.java From adt-leanback-support with Apache License 2.0 | 4 votes |
public static int getWindowId(Object record) { return ((AccessibilityRecord) record).getWindowId(); }
Example #8
Source File: AccessibilityRecordCompatIcs.java From adt-leanback-support with Apache License 2.0 | 4 votes |
public static int getToIndex(Object record) { return ((AccessibilityRecord) record).getToIndex(); }
Example #9
Source File: AccessibilityRecordCompatIcs.java From adt-leanback-support with Apache License 2.0 | 4 votes |
public static List<CharSequence> getText(Object record) { return ((AccessibilityRecord) record).getText(); }
Example #10
Source File: AccessibilityRecordCompatIcs.java From adt-leanback-support with Apache License 2.0 | 4 votes |
public static Object getSource(Object record) { return ((AccessibilityRecord) record).getSource(); }
Example #11
Source File: AccessibilityRecordCompatIcs.java From V.FlyoutTest with MIT License | 4 votes |
public static int getItemCount(Object record) { return ((AccessibilityRecord) record).getItemCount(); }
Example #12
Source File: AccessibilityRecordCompatIcs.java From guideshow with MIT License | 4 votes |
public static Parcelable getParcelableData(Object record) { return ((AccessibilityRecord) record).getParcelableData(); }
Example #13
Source File: AccessibilityRecordCompatIcs.java From adt-leanback-support with Apache License 2.0 | 4 votes |
public static Object obtain(Object record) { return AccessibilityRecord.obtain((AccessibilityRecord) record); }
Example #14
Source File: AccessibilityRecordCompatIcs.java From V.FlyoutTest with MIT License | 4 votes |
public static void setRemovedCount(Object record, int removedCount) { ((AccessibilityRecord) record).setRemovedCount(removedCount); }
Example #15
Source File: AccessibilityRecordCompatJellyBean.java From CodenameOne with GNU General Public License v2.0 | 4 votes |
public static void setSource(Object record, View root, int virtualDescendantId) { ((AccessibilityRecord) record).setSource(root, virtualDescendantId); }
Example #16
Source File: AccessibilityEventCompatIcs.java From CodenameOne with GNU General Public License v2.0 | 4 votes |
public static void appendRecord(AccessibilityEvent event, Object record) { event.appendRecord((AccessibilityRecord) record); }
Example #17
Source File: AccessibilityRecordCompatIcs.java From V.FlyoutTest with MIT License | 4 votes |
public static int getFromIndex(Object record) { return ((AccessibilityRecord) record).getFromIndex(); }
Example #18
Source File: AccessibilityRecordCompatIcsMr1.java From adt-leanback-support with Apache License 2.0 | 4 votes |
public static void setMaxScrollY(Object record, int maxScrollY) { ((AccessibilityRecord) record).setMaxScrollY(maxScrollY); }
Example #19
Source File: AccessibilityEventCompatIcs.java From guideshow with MIT License | 4 votes |
public static void appendRecord(AccessibilityEvent event, Object record) { event.appendRecord((AccessibilityRecord) record); }
Example #20
Source File: AccessibilityRecordCompatIcs.java From guideshow with MIT License | 4 votes |
public static void setParcelableData(Object record, Parcelable parcelableData) { ((AccessibilityRecord) record).setParcelableData(parcelableData); }
Example #21
Source File: AccessibilityRecordCompatIcs.java From V.FlyoutTest with MIT License | 4 votes |
public static void setBeforeText(Object record, CharSequence beforeText) { ((AccessibilityRecord) record).setBeforeText(beforeText); }
Example #22
Source File: AccessibilityRecordCompatIcs.java From adt-leanback-support with Apache License 2.0 | 4 votes |
public static void setFullScreen(Object record, boolean isFullScreen) { ((AccessibilityRecord) record).setFullScreen(isFullScreen); }
Example #23
Source File: AccessibilityRecordCompatIcs.java From CodenameOne with GNU General Public License v2.0 | 4 votes |
public static void setScrollable(Object record, boolean scrollable) { ((AccessibilityRecord) record).setScrollable(scrollable); }
Example #24
Source File: AccessibilityRecordCompatIcs.java From adt-leanback-support with Apache License 2.0 | 4 votes |
public static void setSource(Object record, View source) { ((AccessibilityRecord) record).setSource(source); }
Example #25
Source File: AccessibilityRecordCompatIcs.java From CodenameOne with GNU General Public License v2.0 | 4 votes |
public static void setScrollX(Object record, int scrollX) { ((AccessibilityRecord) record).setScrollX(scrollX); }
Example #26
Source File: AccessibilityRecordCompatJellyBean.java From adt-leanback-support with Apache License 2.0 | 4 votes |
public static void setSource(Object record, View root, int virtualDescendantId) { ((AccessibilityRecord) record).setSource(root, virtualDescendantId); }
Example #27
Source File: AccessibilityRecordCompatIcs.java From CodenameOne with GNU General Public License v2.0 | 4 votes |
public static void setPassword(Object record, boolean isPassword) { ((AccessibilityRecord) record).setPassword(isPassword); }
Example #28
Source File: AccessibilityRecordCompatIcs.java From V.FlyoutTest with MIT License | 4 votes |
public static boolean isEnabled(Object record) { return ((AccessibilityRecord) record).isEnabled(); }
Example #29
Source File: AccessibilityRecordCompatIcs.java From guideshow with MIT License | 4 votes |
public static Object obtain(Object record) { return AccessibilityRecord.obtain((AccessibilityRecord) record); }
Example #30
Source File: AccessibilityRecordCompatIcs.java From V.FlyoutTest with MIT License | 4 votes |
public static void setScrollY(Object record, int scrollY) { ((AccessibilityRecord) record).setScrollY(scrollY); }