To pytanie zostało już zadane here, ale nie ma rozwiązania.Dlaczego atrybut minHeight nie działa w WebView Android?
Mam WebView
. Chcę ustawić minimalną wysokość na WebView
przy użyciu atrybutu minHeight
, ale to nie działa. Ten sam atrybut działa dla przycisku.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.anshul.webview.WebActivity">
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="400dp"></WebView>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:minHeight="150dp"
android:text="This is a Button. It's minHeight is set to 150 dp and it works !!"/>
wyraźnie z poniższej obrazu, WebView nie wspiera atrybut minHeight
. Czy ktokolwiek zna rozwiązanie tego problemu?
w której wersji Android występuje ten problem? – savepopulation
Próbowałem go na Androidzie 25 i stawiłem czoła temu problemowi. Ale myślę, że nie jest to związane z wersją Androida. – thedarkpassenger
Wystąpiły pewne problemy z wyświetlaniem stron internetowych w wersjach pre kit kat. więc zapytałem. – savepopulation