Manuel Wenner
- Forum-Beiträge: 40
03.07.2011, 14:16:03 via Website
03.07.2011 14:16:03 via Website
Hey Leute,
ich versuche schon seit 2 Tagen erfolglos die Höhe meiner Webview dynamisch zu setzen bzw. zu halten.
Leider hab ich nur den "Erfolg" verbuchen können, das ich ein ca. 10px großes Layout bekomme.
Hier mal mein Code.
content.xml (Ohne Linear Layout zeigt er mir gar nichts an)
<LinearLayout android:id="@+id/layoutHerstellung"
xmlns:android="http://schemas.android.com/apk/res/android" style="@style/layoutWebviews">
<WebView android:id="@+id/wvHerstellung" style="@style/wvHerstellung"></WebView>
</LinearLayout>
Und hier die Styles dazu (wrap_content hat auch keine Besserung gebracht)
<style name="layoutWebviews">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">320px</item>
<item name="android:orientation">vertical</item>
</style>
<style name="wvHerstellung">
<item name="android:layout_width">280px</item>
<item name="android:layout_height">fill_parent</item>
<!-- <item name="android:cacheColorHint">#00000000</item> -->
<item name="android:layout_marginLeft">20px</item>
<item name="android:layout_marginRight">20px</item>
<item name="android:layout_marginTop">10px</item>
<item name="android:layout_marginBottom">30px</item>
<item name="android:orientation">vertical</item>
</style>
ich versuche schon seit 2 Tagen erfolglos die Höhe meiner Webview dynamisch zu setzen bzw. zu halten.
Leider hab ich nur den "Erfolg" verbuchen können, das ich ein ca. 10px großes Layout bekomme.
Hier mal mein Code.
content.xml (Ohne Linear Layout zeigt er mir gar nichts an)
<LinearLayout android:id="@+id/layoutHerstellung"
xmlns:android="http://schemas.android.com/apk/res/android" style="@style/layoutWebviews">
<WebView android:id="@+id/wvHerstellung" style="@style/wvHerstellung"></WebView>
</LinearLayout>
Und hier die Styles dazu (wrap_content hat auch keine Besserung gebracht)
<style name="layoutWebviews">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">320px</item>
<item name="android:orientation">vertical</item>
</style>
<style name="wvHerstellung">
<item name="android:layout_width">280px</item>
<item name="android:layout_height">fill_parent</item>
<!-- <item name="android:cacheColorHint">#00000000</item> -->
<item name="android:layout_marginLeft">20px</item>
<item name="android:layout_marginRight">20px</item>
<item name="android:layout_marginTop">10px</item>
<item name="android:layout_marginBottom">30px</item>
<item name="android:orientation">vertical</item>
</style>
Empfohlener redaktioneller Inhalt
Mit Deiner Zustimmung wird hier ein externer Inhalt geladen.
Mit Klick auf den oben stehenden Button erklärst Du Dich damit einverstanden, dass Dir externe Inhalte angezeigt werden dürfen. Dabei können personenbezogene Daten an Drittanbieter übermittelt werden. Mehr Infos dazu findest Du in unserer Datenschutzerklärung.