2016-12-22 5 views
0

중첩 스크롤 또는 scrollview를 사용하지 않고 recyclerview를 스크롤하고 다른 객체를 스크롤하는 것이 가능한지 알고 싶습니까?recyclerview 스크롤하는 방법 recyclerview 외부에서 객체 스크롤

<LinearLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:orientation="vertical"> 
    <TextView 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:layout_marginTop="50dp" 
    android:layout_gravity="center" 
    android:gravity="center" 
    android:text="Text or other oject will list here" 
    android:id="@+id/info"/> 
    <android.support.v7.widget.RecyclerView 
    android:id="@+id/business_recycle" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" /> 
</LinearLayout> 
+0

확인 프로그램이 recyclerView.setNestedScrollingEnabled(false); 설정 –

답변

0
<android.support.v4.widget.NestedScrollView 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:orientation="vertical"> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:orientation="vertical"> 

     <TextView 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_marginTop="50dp" 
      android:layout_gravity="center" 
      android:gravity="center" 
      android:text="Text or other oject will list here" 
      android:id="@+id/info"/> 

     <android.support.v7.widget.RecyclerView 
      android:id="@+id/business_recycle" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" /> 
    </LinearLayout> 
</android.support.v4.widget.NestedScrollView> 

참고 : 스크롤 뷰 안에 안드로이드 목록보기 :