Android: Webview does not resize on rotation (ICS) -
i have simple webview in layout, following setup
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rootview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/baserepeat" android:gravity="top|center_horizontal" android:orientation="vertical" android:paddingbottom="20dp" android:paddingleft="20dp" android:paddingright="20dp" > <webview xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/productdetailcontentwebview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="top" android:background="@drawable/baserepeat" /> //other items...
inside manifest have containing activity set
<activity android:name=".products.productdetailactivity" android:configchanges="keyboardhidden|orientation|screensize" android:screenorientation="sensor" android:theme="@style/theme.cps" > </activity>
my webview populated simple html file on device, works nicely. problem when rotate device portrait landscale, webview becomes deal taller, pushing whatever below further down in layout. amount of content doesn't change - set in oncreate().
i'm using webview render content it's own special stylesheet, , must stay within scrollview.
i can provide more information if required :)
i had similar issue when working on 2.3/4.0...
i tried several things solution helped me in getting rid of core issue was:
removing screensize
android:configchanges
in androidmanifest.xml
hope helps !!!
Comments
Post a Comment