我有一个viewpager
其中包含作为父母scrollview
和webview
作为child.I从来没有面临肖像模式的问题,但在横向模式下,它的行为很奇怪。Android的滚动问题webview内滚动视图与viewpager
屏幕正在拍摄肖像高度(我假设)在景观。 因此,滚动时scrollview
被激活。
如果我通过放requestDisallowInterceptTouchEvent(true);
来阻止触摸,但如果我这样做,我无法移动到下一页。
我给在configChanges以下
android:configChanges="keyboardHidden|orientation|screenSize"
这里是我的主XML代码
<?xml version="1.0" encoding="utf-8"?><ScrollView
android:id="@+id/nestedScrollView"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/topMostLayout">
<RelativeLayout
android:id="@+id/topbarlayout"
android:layout_width="match_parent"
android:layout_height="43dp"
android:background="@android:color/white">
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@android:color/darker_gray"
android:layout_marginBottom="4dp" />
<com.mango.expert.utils.FullCard_ShadowLayout
android:id="@+id/activity_shadow_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:sl_cornerRadius="7dp"
app:sl_shadowColor="@color/shadow">
<FrameLayout
android:id="@+id/dummyLayoutForViewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:id="@+id/dummyLinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_margin="2dp"
android:background="@drawable/for_full_card_bg" >
</LinearLayout>
</FrameLayout>
</com.mango.expert.utls.FullCard_ShadowLayout>
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
</android.support.v4.view.ViewPager>
有些标签丢失,我发现在粘贴XML here.xml困难完全没问题。 任何帮助将是非常great.Forgot一提的是网页视图是碎片和滚动型是主要布局
世界上没有其他需要补充的WebView内滚动视图 – Mrinmoy
如果我删除滚动型我无法看在景观模式下的全部内容 – venky