# WebView.HitTestResult

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#constants)\|[Methods](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#inhmethods)  

# WebView.HitTestResult

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/webkit/WebView.HitTestResult "View this page in Kotlin")\|Java

`
public
static


class
WebView.HitTestResult
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|--------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.webkit.WebView.HitTestResult |

<br />

*** ** * ** ***

## Summary

|                                                                                              ### Constants                                                                                              ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [ANCHOR_TYPE](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#ANCHOR_TYPE) *This constant was deprecated in API level 15. This type is no longer used.*             |
| `int` | [EDIT_TEXT_TYPE](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#EDIT_TEXT_TYPE) HitTestResult for hitting an edit text area.                                       |
| `int` | [EMAIL_TYPE](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#EMAIL_TYPE) HitTestResult for hitting an email address.                                                |
| `int` | [GEO_TYPE](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#GEO_TYPE) HitTestResult for hitting a map address.                                                       |
| `int` | [IMAGE_ANCHOR_TYPE](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#IMAGE_ANCHOR_TYPE) *This constant was deprecated in API level 15. This type is no longer used.* |
| `int` | [IMAGE_TYPE](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#IMAGE_TYPE) HitTestResult for hitting an HTML::img tag.                                                |
| `int` | [PHONE_TYPE](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#PHONE_TYPE) HitTestResult for hitting a phone number.                                                  |
| `int` | [SRC_ANCHOR_TYPE](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#SRC_ANCHOR_TYPE) HitTestResult for hitting a HTML::a tag with src=http.                           |
| `int` | [SRC_IMAGE_ANCHOR_TYPE](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#SRC_IMAGE_ANCHOR_TYPE) HitTestResult for hitting a HTML::a tag with src=http + HTML::img.   |
| `int` | [UNKNOWN_TYPE](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#UNKNOWN_TYPE) Default HitTestResult, where the target is unknown.                                    |

|                                                                                                               ### Public methods                                                                                                                ||
|-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[getExtra](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#getExtra())`() ` Gets additional type-dependant information about the result. |
| ` int`                                                                | ` `[getType](https://developer.android.com/reference/android/webkit/WebView.HitTestResult#getType())`() ` Gets the type of the hit test result.                          |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### ANCHOR_TYPE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ANCHOR_TYPE
```

<br />

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

<br />

<br />

Constant Value: 1 (0x00000001)  

### EDIT_TEXT_TYPE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int EDIT_TEXT_TYPE
```

HitTestResult for hitting an edit text area.

<br />

Constant Value: 9 (0x00000009)  

### EMAIL_TYPE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int EMAIL_TYPE
```

HitTestResult for hitting an email address.

<br />

Constant Value: 4 (0x00000004)  

### GEO_TYPE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int GEO_TYPE
```

HitTestResult for hitting a map address.

<br />

Constant Value: 3 (0x00000003)  

### IMAGE_ANCHOR_TYPE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int IMAGE_ANCHOR_TYPE
```

<br />

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

<br />

<br />

Constant Value: 6 (0x00000006)  

### IMAGE_TYPE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int IMAGE_TYPE
```

HitTestResult for hitting an HTML::img tag.

<br />

Constant Value: 5 (0x00000005)  

### PHONE_TYPE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int PHONE_TYPE
```

HitTestResult for hitting a phone number.

<br />

Constant Value: 2 (0x00000002)  

### SRC_ANCHOR_TYPE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int SRC_ANCHOR_TYPE
```

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

<br />

Constant Value: 7 (0x00000007)  

### SRC_IMAGE_ANCHOR_TYPE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int SRC_IMAGE_ANCHOR_TYPE
```

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

<br />

Constant Value: 8 (0x00000008)  

### UNKNOWN_TYPE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int UNKNOWN_TYPE
```

Default HitTestResult, where the target is unknown.

<br />

Constant Value: 0 (0x00000000)

## Public methods

### getExtra

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getExtra ()
```

Gets additional type-dependant information about the result. See[WebView.getHitTestResult()](https://developer.android.com/reference/android/webkit/WebView#getHitTestResult())for details. May either be`null`or contain extra information about this result.

<br />

|                                                              Returns                                                              ||
|--------------------------------------------------------------------|---------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | additional type-dependant information about the result <br /> |

### getType

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getType ()
```

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

<br />

|                    Returns                    ||
|-------|----------------------------------------|
| `int` | the type of the hit test result <br /> |