I am setting following property for webview
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setBuiltInZoomControls(true);
and using following layout.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/solid_white"
android:layout_marginLeft="1dp" android:gravity="center">
<WebView
android:id="@+id/MyView"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</WebView>
</RelativeLayout>
This layout is for fragment. View is coming centrally vertical but it not coming centrally horizontal. What I need to do to set webview at the center of relative layout?