Android webview放大相对布局
我有一个RelativeLayout,里面有一个网络视图。放大和缩小后,我的WebView不在中心。当我在RelativeLayout中包含另一个视图时,我不能将WebView放在中间。 有谁能提出建议吗?? 谢谢你的帮助Android webview放大相对布局,android,webview,android-relativelayout,zooming,Android,Webview,Android Relativelayout,Zooming,我有一个RelativeLayout,里面有一个网络视图。放大和缩小后,我的WebView不在中心。当我在RelativeLayout中包含另一个视图时,我不能将WebView放在中间。 有谁能提出建议吗?? 谢谢你的帮助 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/fullscreen_image_parrent" android:orientati
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fullscreen_image_parrent"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/black">
<WebView
android:id="@+id/webview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true">
</WebView>
<include layout="@layout/full_image_controls"/>
首先,您不需要在
RelativeLayout
中标记方向。还有一件事..您是否尝试将布局宽度和高度参数设置为fill\u parent
。我不是很确定,但在某些情况下,我在视图对齐方面遇到了几乎相同的问题,因为我的RelativeLayout
使用了wrap\u内容
而不是fill\u parent
首先,你不需要orientation
标记RelativeLayout
。还有一件事..您是否尝试将布局宽度和高度参数设置为fill\u parent
。我不是很确定,但是在某些情况下,我在视图对齐方面遇到了几乎相同的问题,只是因为我的RelativeLayout
使用了wrap\u content
而不是fill\u parent将fill\u parent设置为RelativeLayout,并将full\u image\u控件布局中的内容放在这里。设置将父控件填充到RelativeLayout,完整图片控件布局中的内容请先将完整图片控件布局代码放在这里。我已经失去了收到答案的希望!在我开始变焦后,出现了一个奇怪的问题:图像在变焦时有点跳跃。无论如何,非常感谢)我已经失去了得到答案的希望!在我开始变焦后,出现了一个奇怪的问题:图像在变焦时有点跳跃。无论如何,非常感谢你)