我设置的WebView这样:屏幕分辨率和窗口小部件
<WebView
android:id="@+id/webView1"
android:layout_width="match_parent"
android:layout_height="500px"
android:layout_below="@+id/button1"
android:layout_centerHorizontal="true" />
,但是这是正确的?如果Android手机的分辨率发生变化,我应该用百分比而不是像素为单位给出高度。
你需要给dp。 –