Reputation: 1063
I try to make webView height wrap_content and use for scrolling an external scrollview. But in my case scrolls only webView and other views which placed below, not shown. I need to show checkbox and buttons just below the webView. Here is my layout. Probably there is some way to disable scrolling inside of webView? Does anyone trying to do something like this?
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:orientation="vertical"
android:paddingEnd="8dp"
android:paddingStart="8dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:text="@string/signup_title_complete_registration"
android:textColor="?android:textColorPrimary"
android:textSize="24sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:gravity="center"
android:text="@string/signup_subtitle_complete_registration"
android:textColor="?android:textColorPrimary"
android:textSize="14sp" />
<WebView
android:id="@+id/disclosureWv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible" />
<CheckBox
android:id="@+id/chekBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:background="?selectableItemBackground"
android:button="@null"
android:checked="@={viewModel.agree}"
android:drawableEnd="?android:listChoiceIndicatorMultiple"
android:ellipsize="end"
android:gravity="start|center"
android:maxLines="4"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="@string/signup_title_agreement_checkbox"
android:textColor="?android:attr/textColorPrimary"
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/buttonContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="8dp">
<Button
android:id="@+id/previousBtn"
style="@style/Button.White.BlueStroke"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:onClick="@{() -> viewModel.onPreviousClicked()}"
android:text="@string/general_button_previous_step"
android:textColor="?android:textColorTertiaryInverse"
android:textSize="16sp" />
<Button
android:id="@+id/nextBtn"
style="@style/Button.Positive"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:enabled="@{viewModel.enabled}"
android:onClick="@{() -> viewModel.onNextClicked()}"
android:text="@string/general_button_next"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
how can i reach that behavior?
Upvotes: 0
Views: 1183
Reputation: 1063
WebView content was trimmed only on emulator. When i built the app on a real device everything became fine
Upvotes: 1