# WebView.WebViewTransport

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

# WebViewTransport

*** ** * ** ***

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

```
open class WebViewTransport
```

|---|------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                     ||
| ↳ | [android.webkit.WebView.WebViewTransport](https://developer.android.com/reference/kotlin/android/webkit/WebView.WebViewTransport#) |

Transportation object for returning WebView across thread boundaries.

## Summary

|                                                             Public constructors                                                             ||
|------------------------------------------------------------------------------------------------------------------------------------------|---|
| [WebViewTransport](https://developer.android.com/reference/kotlin/android/webkit/WebView.WebViewTransport#WebViewTransport())`()` <br /> |

|                                                                                                                                                                                 Public methods                                                                                                                                                                                  ||
|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[WebView](https://developer.android.com/reference/kotlin/android/webkit/WebView)? | [getWebView](https://developer.android.com/reference/kotlin/android/webkit/WebView.WebViewTransport#getWebView())`()` Gets the WebView object.                                                                                                                                           |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)      | [setWebView](https://developer.android.com/reference/kotlin/android/webkit/WebView.WebViewTransport#setWebView(android.webkit.WebView))`(`webview:` `[WebView](https://developer.android.com/reference/kotlin/android/webkit/WebView)?`)` Sets the WebView to the transportation object. |

## Public constructors

### WebViewTransport

```
WebViewTransport()
```

## Public methods

### getWebView

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

```
open fun getWebView(): WebView?
```

Gets the WebView object.

|                                                                   Return                                                                   ||
|-----------------------------------------------------------------------------------|---------------------------------------------------------|
| [WebView](https://developer.android.com/reference/kotlin/android/webkit/WebView)? | the transported WebView object This value may be`null`. |

### setWebView

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

```
open fun setWebView(webview: WebView?): Unit
```

Sets the WebView to the transportation object.

|                                                                   Parameters                                                                   ||
|-----------|-------------------------------------------------------------------------------------------------------------------------------------|
| `webview` | [WebView](https://developer.android.com/reference/kotlin/android/webkit/WebView)?:the WebView to transport This value may be`null`. |