Search in sources :

Example 11 with Descriptor

use of com.facebook.stetho.inspector.elements.Descriptor in project stetho by facebook.

the class DialogFragmentDescriptor method getElementToHighlightAtPosition.

@Nullable
@Override
public Object getElementToHighlightAtPosition(Object element, int x, int y, Rect bounds) {
    final Descriptor.Host host = getHost();
    Dialog dialog = null;
    HighlightableDescriptor descriptor = null;
    if (host instanceof AndroidDescriptorHost) {
        dialog = mAccessor.getDialog(element);
        descriptor = ((AndroidDescriptorHost) host).getHighlightableDescriptor(dialog);
    }
    return descriptor == null ? null : descriptor.getElementToHighlightAtPosition(dialog, x, y, bounds);
}
Also used : Dialog(android.app.Dialog) ChainedDescriptor(com.facebook.stetho.inspector.elements.ChainedDescriptor) AbstractChainedDescriptor(com.facebook.stetho.inspector.elements.AbstractChainedDescriptor) Descriptor(com.facebook.stetho.inspector.elements.Descriptor) Nullable(javax.annotation.Nullable)

Aggregations

Descriptor (com.facebook.stetho.inspector.elements.Descriptor)11 Nullable (javax.annotation.Nullable)9 AbstractChainedDescriptor (com.facebook.stetho.inspector.elements.AbstractChainedDescriptor)8 Window (android.view.Window)5 NodeDescriptor (com.facebook.stetho.inspector.elements.NodeDescriptor)3 ObjectDescriptor (com.facebook.stetho.inspector.elements.ObjectDescriptor)3 Dialog (android.app.Dialog)2 View (android.view.View)2 ChainedDescriptor (com.facebook.stetho.inspector.elements.ChainedDescriptor)2 Accumulator (com.facebook.stetho.common.Accumulator)1