2017-01-09 2 views
0

나는 부모로 scrollview과 자식으로 webview와 레이아웃을 포함하고 있습니다. 나는 풍경 모드에서 아무런 문제가 발생하지 않았지만 그것은 매우 이상하게 행동합니다.안드로이드 스크롤 문제 viewviewer와 scrollview 내

화면이 가로로 세로 높이 (가정합니다)를 사용하고 있습니다. 아래로 스크롤하면 scrollview이 활성화됩니다.

requestDisallowInterceptTouchEvent(true);을 터치하여 차단하면 그 다음 페이지로 이동할 수 없습니다.

은 내가
android:configChanges="keyboardHidden|orientation|screenSize" 

여기

<?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에 어려움을 찾는거야 내 주요 XML 코드의 configChanges에 다음했다 완전히 괜찮아. 어떤 도움은 웹보기가 조각에와있는 ScrollView 당신은 웹보기에 대한 에게있는 ScrollView를 구현할 필요가 없습니다 주요 레이아웃

+0

프로그래머 내가 볼 수없는거야있는 ScrollView를 제거하면있는 ScrollView – Mrinmoy

+0

내부에 웹뷰를 추가 할 필요가 :

parent.setNestedScrollingEnabled(true); 

또는 NestedScrollView 내부 전체 레이아웃을 포장 가로 모드의 전체 내용 – venky

답변

1

에 언급 정말 great.Forgot 것이다. 이미 자체 기능이 있습니다.

+0

scrollview를 제거하여 시도했지만 가로 모드의 전체 내용을 가로 방향의 세로 높이로 볼 수 없습니다. – venky

+1

높이를 적용하지 않았다고 생각합니다. XML 파일에서 "match_parnet"으로. – bharat7777

+0

, match_parent를 받았습니다. – venky

0

부모 레이아웃에 NestedScrolling 사용 :

<android.support.v4.widget.NestedScrollView 
     android:id="@+id/nScrollView" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:fillViewport="true"> 

     <FrameLayout ...> 
      <ViewPager ... /> 
     </FrameLayout > 
    </android.support.v4.widget.NestedScrollView> 
+0

답변 해 주셔서 감사합니다. – venky

+0

아쉽게도 작동하지 않았으므로 초상화 모드에서도 일반 webview 스크롤을 차단했습니다. – venky

+0

xml 코드를 질문에 붙여 넣을 수 있습니까? –