android एक्सेसिंग सेविसेज(फेसबुक) रीसाइक्लर देखें से पाठ पढ़ना



facebook android-recyclerview (1)

मैंने नेस्टेड स्क्रॉल दृश्यों के साथ समस्या का सामना किया है, सभी विचारों को पुन: प्राप्त करने के साथ सुलझाया, मुझे लगता है, आपने पहले से ही यह कोशिश की है यहाँ मेरे मामले में समाधान का काम है, आप कोशिश कर सकते हैं कि यह आपके लिए भी काम करे।

private AccessibilityNodeInfo accessbiltyContent(AccessibilityNodeInfo parentView,String strAddress) throws Exception {

    int childCount = parentView.getChildCount();


    for (int i = 0; i < childCount; ++i) {
        AccessibilityNodeInfo child = parentView.getChild(i);
        // child=null;
        if (child != null) {

            String strToAddress=strAddress+" > "+child.getClassName().toString();
            String nodeText="";

            if(child.getText() != null)
                nodeText=child.getText().toString();


            Log.v(TAG,"values =" +child.getClassName().toString(),nodeText,strToAddress));
            accessbiltyContent(child,strToAddress);

        }
        else {
            return null;
        }
    }

    return null;


}

यह माता-पिता में सभी विचारों का पता लगाएगा और उन्हें खोजने के लिए छापेंगी।

मैं गैर-केंद्रित रिसाइकिलर देखेंगे बच्चों (वस्तुओं) का पाठ कैसे देख सकता हूँ?

मेरी एक्सेस-योग्यता सेवा को स्क्रीन से पाठ पढ़ना चाहिए, जिसमें कीवर्ड शामिल हैं। यह ज्यादातर परिस्थितियों में अच्छी तरह से काम करता है, सिवाय जहां मैं रीसाइक्लेर वीज से काम करता हूं, विशेषकर उन लोगों को फेसबुक एप्लिकेशन में।

फेसबुक फीड और टिप्पणियां स्क्रीन दोनों रीसाइक्लेअर वीव पर आधारित हैं और न ही मुझे उनके पहुंच-योग्यता कार्यक्रमों की आवश्यकता के लिए पाठ की पहुंच प्रदान करते हैं।

मैंने क्या प्रयास किया है:

public void onAccessibilityEvent(AccessibilityEvent event) {

    //I've tried looping through event.getText() and it does not contain the text entries

    //I've also tried the following (with various null checks)
    AccessibilityRecordCompat record = AccessibilityEventCompat.asRecord(event);
    AccessibilityNodeInfoCompat source = record.getSource();
    List<AccessibilityNodeInfoCompat> nodes = source.findAccessibilityNodeInfosByText("...");
    //(and loop through the entries)

    //I've also tried limiting to the class name "android.support.v7.widget.RecyclerView"
    //and looking at parcelableData

    //In the facebook app, the following is always null too
    source.findFocus(AccessibilityNodeInfoCompat.FOCUS_ACCESSIBILITY);

}

कहीं भी मुझे आवश्यक डेटा शामिल नहीं है एक उदाहरण के रूप में जब किसी पोस्ट से टिप्पणियां स्क्रीन / ओवरले खोलते हैं, तो मैं सभी पाठ सामग्री को अपने आप टिप्पणियों को छोड़कर देख सकता हूँ (जो रीसाइक्लर के अंदर है)

ईवेंट विवरण के लॉग जो मुझे देख सकते हैं:

एक टिप्पणी के साथ पोस्ट पर टिप्पणी ओवरले के लिए मैं जो देख रहा हूं वह यहां है

Event: EventType: TYPE_WINDOW_CONTENT_CHANGED; PackageName: com.facebook.katana; MovementGranularity: 0; Action: 0 [ ClassName: android.support.v7.widget.RecyclerView; Text: []; ContentDescription: null; ItemCount: 100; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: true; BeforeText: null; FromIndex: 13; ToIndex: 24; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
Event: EventType: TYPE_WINDOW_STATE_CHANGED;   PackageName: com.facebook.katana; MovementGranularity: 0; Action: 0 [ ClassName: X.BGT; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: true; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
Event: EventType: TYPE_WINDOW_CONTENT_CHANGED; PackageName: com.facebook.katana; MovementGranularity: 0; Action: 0 [ ClassName: android.support.v7.widget.RecyclerView; Text: []; ContentDescription: null; ItemCount: 1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: 0; ToIndex: 0; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
Event: EventType: TYPE_WINDOW_CONTENT_CHANGED; PackageName: com.facebook.katana; MovementGranularity: 0; Action: 0 [ ClassName: android.view.ViewGroup; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
Event: EventType: TYPE_WINDOW_CONTENT_CHANGED; PackageName: com.facebook.katana; MovementGranularity: 0; Action: 0 [ ClassName: android.widget.FrameLayout; Text: []; ContentDescription: Photo; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
Event: EventType: TYPE_WINDOW_CONTENT_CHANGED; PackageName: com.facebook.katana; MovementGranularity: 0; Action: 0 [ ClassName: android.widget.FrameLayout; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
Event: EventType: TYPE_WINDOW_CONTENT_CHANGED; PackageName: com.facebook.katana; MovementGranularity: 0; Action: 0 [ ClassName: android.widget.ImageButton; Text: []; ContentDescription: Stickers; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: false; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
Event: EventType: TYPE_WINDOW_CONTENT_CHANGED; PackageName: com.facebook.katana; MovementGranularity: 0; Action: 0 [ ClassName: android.widget.FrameLayout; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
Event: EventType: TYPE_WINDOW_CONTENT_CHANGED; PackageName: com.facebook.katana; MovementGranularity: 0; Action: 0 [ ClassName: android.widget.TextView; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
Event: EventType: TYPE_WINDOW_STATE_CHANGED;   PackageName: com.facebook.katana; MovementGranularity: 0; Action: 0 [ ClassName: X.BGT; Text: [Be the first to like this., Like Button, Photo Comment, Write a comment…, Open GIF search, Stickers]; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: true; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0

मैंने स्रोत के बच्चों को तलाशने का भी प्रयास किया है, लेकिन केवल समूह देखेंगे (कोई दृश्य नहीं) और हमेशा पाठ के बातिल के साथ

Ancestor for 0 = android.view.accessibility.[email protected]; boundsInParent: Rect(0, 0 - 1056, 236); boundsInScreen: Rect(12, 244 - 1068, 480); packageName: com.facebook.katana; className: android.view.ViewGroup; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]
Ancestor for 0, 0 = android.view.accessibility.[email protected]; boundsInParent: Rect(0, 0 - 1056, 236); boundsInScreen: Rect(12, 244 - 1068, 480); packageName: com.facebook.katana; className: android.view.ViewGroup; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: true; contextClickable: false; enabled: true; password: false; scrollable: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_LONG_CLICK - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]
Ancestor for 0, 0, 0 = android.view.accessibility.[email protected]; boundsInParent: Rect(0, 0 - 828, 58); boundsInScreen: Rect(204, 262 - 1032, 320); packageName: com.facebook.katana; className: android.view.ViewGroup; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: true; longClickable: true; contextClickable: false; enabled: true; password: false; scrollable: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_LONG_CLICK - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]
Ancestor for 0, 0, 0, 0 = android.view.accessibility.[email protected]; boundsInParent: Rect(0, 0 - 268, 58); boundsInScreen: Rect(204, 262 - 472, 320); packageName: com.facebook.katana; className: android.view.ViewGroup; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: true; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]
Ancestor for 0, 0, 1 = android.view.accessibility.[email protected]; boundsInParent: Rect(0, 0 - 828, 48); boundsInScreen: Rect(204, 320 - 1032, 368); packageName: com.facebook.katana; className: android.view.ViewGroup; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: true; longClickable: true; contextClickable: false; enabled: true; password: false; scrollable: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_LONG_CLICK - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]
Ancestor for 0, 0, 2 = android.view.accessibility.[email protected]; boundsInParent: Rect(0, 0 - 828, 80); boundsInScreen: Rect(204, 382 - 1032, 462); packageName: com.facebook.katana; className: android.view.ViewGroup; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]
Ancestor for 0, 0, 2, 0 = android.view.accessibility.[email protected]; boundsInParent: Rect(0, 0 - 93, 44); boundsInScreen: Rect(507, 394 - 600, 438); packageName: com.facebook.katana; className: android.view.ViewGroup; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: true; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]
Ancestor for 0, 0, 2, 1 = android.view.accessibility.[email protected]; boundsInParent: Rect(0, 0 - 114, 44); boundsInScreen: Rect(632, 394 - 746, 438); packageName: com.facebook.katana; className: android.view.ViewGroup; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: true; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]

मुझे यकीन नहीं है कि यह निश्चित रूप से संभव है या मैं पूरी तरह गलत दृष्टिकोण ले सकता हूं। मैंने टॉकबैक मोड में देखा है कि प्रयोक्ता को रीसाइक्लेरव्यू बच्चे के अलग-अलग तत्वों पर ध्यान देना चाहिए / पढ़ना चाहिए इससे पहले कि वह पढ़ा जाए, जो मेरी सेवा के लिए एक विकल्प नहीं है (जो कि रुचि की उन वस्तुओं को खोजना है)





android-accessibility