Closed nitinmishra27 closed 10 years ago
I fixed the issue by placing my webView in a ScrollView like this
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<WebView
android:id="@+id/about_it_ebooks_wv"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</ScrollView>
anyways, you should find a way, to do this.
I have this custom dialog implementation
public static String TAG = "MainContainerDialogHelpers"; static String dialog_title, contentUrl_to_load; public static void show(SherlockFragmentActivity activity, String title, String contentURL) { dialog_title = title; contentUrl_to_load = contentURL; //contentURL is html file from assests in this form "file:///android_asset/help_documentation.html" new MainContainerDialogHelpers().show(activity.getSupportFragmentManager(), TAG); } @Override public BaseDialogFragment.Builder build(BaseDialogFragment.Builder builder) { builder.setTitle(dialog_title); LayoutInflater layoutInflater = LayoutInflater.from(getActivity()); View v = layoutInflater.inflate(R.layout.about_it_ebooks, null);
and this is my layout
<?xml version="1.0" encoding="utf-8"?> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/about_it_ebooks_wv" android:layout_width="fill_parent" android:layout_height="fill_parent" />
The problem is when dialog builds it gives IMAGE1 (webview is not expanded)
When i change the orientation to horizontal it gives IMAGE2(Webview is now expanded)
Again When i change the orientation to potrait it gives me IMAGE3(Webview is expanded by default)
So i want to know if i'm doing some wrong thing or it's an issue known to you Guys.