I am using a WebView to display content, however, content that is long creates horizontal scrolling, which is not desired. When I attempt to use methods like setLoadWithOverviewMode()
and setUseWideViewPort()
, etc, as all of the other solutions suggest, the text is shrunk too small to read. The Autosizing Layout Algorithm produces the same result as well.
The desired outcome is to have the html retain its scale, but wrap the text to make it fit the screen, rather than scaling the text size down. Here is my xml, if its any help:
<ScrollView>
...
<LinearLayout
android:id="@+id/details_fragment_description_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/margin_extra_extra_large"
android:background="@color/white"
android:orientation="horizontal"
android:paddingTop="@dimen/padding_extra_extra_large"
android:visibility="visible">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="@dimen/padding_extra_extra_large"
android:paddingStart="@dimen/padding_extra_extra_large"
android:src="@drawable/ic_drafts_24_biscay"/>
<WebView
android:id="@+id/details_fragment_description_webview"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>