how to show html text in webview android
XML
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webview"></WebView>
<TextView
android:textColor="#FF018786"
android:layout_marginTop="@dimen/_5dp"
android:textSize="@dimen/_15sdp"
android:id="@+id/text"
android:layout_marginRight="10dp"
android:text="change"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
Java Code
Spanned htmlAsSpanned = Html.fromHtml(description); // used by TextView
binding.webview.loadDataWithBaseURL(null, String.valueOf(htmlAsSpanned), "text/html", "utf-8", null);