我正在尝试在android中旋转包含webview的框架布局,这是我的代码:
FrameLayout contentView = (FrameLayout) getRootView().findViewById(
R.id.content);
FrameLayout backGround = new FrameLayout(getContext());
FrameLayout.LayoutParams bgfl = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.FILL_PARENT,
FrameLayout.LayoutParams.FILL_PARENT);
backGround.addView(WebView object);
contentView.addView(backGround, bgfl);
RotateAnimation r = new RotateAnimation(0f, -90f,Animation.RELATIVE_TO_SELF,0.5f,
Animation.RELATIVE_TO_SELF,0.5f);
r.setDuration(0);
r.setFillAfter(true);
LayoutAnimationController animController = new LayoutAnimationController(r, 0);
backGround.setLayoutAnimation(animController);
它可以旋转......但问题是webview中的任何可点击区域都不会根据布局的旋转坐标系改变它的坐标。webview的滚动也被反转了
有关如何解决此问题的任何建议