File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
libraries/dialogs/src/main/java/com/trendyol/uicomponents/dialogs Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ open class Builder internal constructor() {
19
19
var animateCornerRadiusWhenExpand: Boolean = false
20
20
var onDialogDismissListener: ((DialogFragment ) -> Unit )? = null
21
21
var cornerRadius: Float? = null
22
+ var isFullHeightWebView: Boolean = false
22
23
}
23
24
24
25
open class InfoDialogBuilder internal constructor() : Builder() {
@@ -56,6 +57,7 @@ open class InfoDialogBuilder internal constructor() : Builder() {
56
57
contentTextPosition = it.contentTextPosition,
57
58
webViewContent = it.webViewContent,
58
59
webViewBuilder = it.webViewBuilder,
60
+ isFullHeightWebView = it.isFullHeightWebView
59
61
).toBundle()
60
62
this .closeButtonListener = it.closeButtonListener ? : { }
61
63
this .onDismissListener = it.onDialogDismissListener ? : {}
Original file line number Diff line number Diff line change @@ -196,6 +196,10 @@ class DialogFragment internal constructor() : BaseBottomSheetDialog() {
196
196
dialogArguments.webViewBuilder?.invoke(webViewContent)
197
197
198
198
loadWebViewContent(viewState.webViewContent)
199
+ if (dialogArguments.isFullHeightWebView) {
200
+ binding.webViewContent.layoutParams.height =
201
+ resources.displayMetrics.heightPixels
202
+ }
199
203
}
200
204
}
201
205
with (editTextSearch) {
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ class DialogFragmentArguments(
40
40
val webViewBuilder : (WebView .() -> Unit )? = null ,
41
41
val infoListItems : List <Pair <CharSequence , CharSequence >>? = null ,
42
42
val itemDividers : List <ItemDivider > = emptyList(),
43
+ val isFullHeightWebView : Boolean = false
43
44
) : Parcelable {
44
45
45
46
fun toBundle () = bundleOf(" ARGUMENTS" to this )
You can’t perform that action at this time.
0 commit comments