to top
Android APIs
public static class

WebView.HitTestResult

extends Object
java.lang.Object
   ↳ android.webkit.WebView.HitTestResult

Summary

Constants
int ANCHOR_TYPE This constant was deprecated in API level 14. This type is no longer used.
int EDIT_TEXT_TYPE HitTestResult for hitting an edit text area.
int EMAIL_TYPE HitTestResult for hitting an email address.
int GEO_TYPE HitTestResult for hitting a map address.
int IMAGE_ANCHOR_TYPE This constant was deprecated in API level 14. This type is no longer used.
int IMAGE_TYPE HitTestResult for hitting an HTML::img tag.
int PHONE_TYPE HitTestResult for hitting a phone number.
int SRC_ANCHOR_TYPE HitTestResult for hitting a HTML::a tag with src=http.
int SRC_IMAGE_ANCHOR_TYPE HitTestResult for hitting a HTML::a tag with src=http + HTML::img.
int UNKNOWN_TYPE Default HitTestResult, where the target is unknown.
Public Methods

? Examples
String getExtra()
Gets additional type-dependant information about the result.

? Examples
int getType()
Gets the type of the hit test result.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int ANCHOR_TYPE

Added in API level 1

This constant was deprecated in API level 14.
This type is no longer used.

Constant Value: 1 (0x00000001)

public static final int EDIT_TEXT_TYPE

Added in API level 1

HitTestResult for hitting an edit text area.

Constant Value: 9 (0x00000009)

public static final int EMAIL_TYPE

Added in API level 1

HitTestResult for hitting an email address.

Constant Value: 4 (0x00000004)

public static final int GEO_TYPE

Added in API level 1

HitTestResult for hitting a map address.

Constant Value: 3 (0x00000003)

public static final int IMAGE_ANCHOR_TYPE

Added in API level 1

This constant was deprecated in API level 14.
This type is no longer used.

Constant Value: 6 (0x00000006)

public static final int IMAGE_TYPE

Added in API level 1

HitTestResult for hitting an HTML::img tag.

Constant Value: 5 (0x00000005)

public static final int PHONE_TYPE

Added in API level 1

HitTestResult for hitting a phone number.

Constant Value: 2 (0x00000002)

public static final int SRC_ANCHOR_TYPE

Added in API level 1

HitTestResult for hitting a HTML::a tag with src=http.

Constant Value: 7 (0x00000007)

public static final int SRC_IMAGE_ANCHOR_TYPE

Added in API level 1

HitTestResult for hitting a HTML::a tag with src=http + HTML::img.

Constant Value: 8 (0x00000008)

public static final int UNKNOWN_TYPE

Added in API level 1

Default HitTestResult, where the target is unknown.

Constant Value: 0 (0x00000000)

Public Methods

public String getExtra ()

Added in API level 1

Gets additional type-dependant information about the result. See getHitTestResult() for details. May either be null or contain extra information about this result.

Returns
  • additional type-dependant information about the result

public int getType ()

Added in API level 1

Gets the type of the hit test result. See the XXX_TYPE constants defined in this class.

Returns
  • the type of the hit test result
No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.