File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,35 @@ Sample usage:
61
61
}.show(supportFragmentManager)
62
62
```
63
63
64
+ ** Configuring WebView:**
65
+ To configure the WebView instance of the dialog, you can call the DialogFragment's function named show,
66
+ which takes WebViewDownloadConfigurator and WebViewConfigurator objects as parameters.
67
+ These objects must extend Fragments.
68
+
69
+ These passed objects will be used to configure the webview instance of the dialog.
70
+ See the sample usage below:
71
+ ``` kotlin
72
+ infoDialog {
73
+ title = " Info Dialog with WebView Download Listener"
74
+ webViewContent = WebViewContent .UrlContent (" https://github.com/Trendyol" )
75
+ showContentAsHtml = true
76
+ titleTextColor = CardInputViewR .color.civ_error_stroke
77
+ showCloseButton = true
78
+ }.showDialog(
79
+ fragmentManager = supportFragmentManager,
80
+ webViewConfigurator = WebViewJavascriptEnabler (),
81
+ downloadConfigurator = null
82
+ )
83
+
84
+ class WebViewJavascriptEnabler : WebViewConfigurator , Fragment () {
85
+
86
+ override fun configureWebView (webView : WebView ) {
87
+ webView.settings.javaScriptEnabled = true
88
+ }
89
+ }
90
+ ```
91
+ ``` kotlin
92
+
64
93
* Agreement Dialog :
65
94
66
95
Dialog with buttons on bottom. You can show 2 buttons at the bottom or just one button.
You can’t perform that action at this time.
0 commit comments