2017-09-05 3 views
0

RecyclerViewViewHolder 레이아웃 나는이 같은 내용을 스크롤하는 android.widget.ScrollView를 넣어하려고 스크롤이이 RecyclerView ViewHolder있는 ScrollView 레이아웃 뭐가 문제 :

<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:layout_margin="8dp" 
    android:padding="4dp"> 

    <android.widget.ScrollView 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:fillViewport="true" 
     android:scrollbars="vertical"> 

     <RelativeLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content"> 

      <TextView 
       android:id="@+id/title_text" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:padding="10dp" 
       android:text="SOME TEXT" 
       android:textStyle="bold"/> 

      <TextView 
       android:id="@+id/descr_text" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/title_text" 
       android:padding="10dp" 
       android:text="SOME TEXT" 
       android:textStyle="bold"/> 

      <com.github.rahatarmanahmed.cpv.CircularProgressView 
       android:id="@+id/progress_view" 
       android:layout_width="40dp" 
       android:layout_height="40dp" 
       android:layout_centerInParent="true" 
       android:visibility="gone" 
       app:cpv_indeterminate="true"/> 
     </RelativeLayout> 
    </android.widget.ScrollView> 
</LinearLayout> 

문제는 아무것도 내가 그것을 스크롤 할 수 없습니다 발생하지 않습니다 . 제안 사항이 있습니까?

+0

시도해 보셨습니까? [this] (this) (https://stackoverflow.com/questions/27083091/recyclerview-inside-scrollview-is-not-working) [this] (https://stackoverflow.com/questions/33143485/recyclerview-inside- scrollview-not-scrolling-smoothly) –

+0

dp에 높이를 넣으려고합니까? – Vodet

답변

2

귀하의 RecyclerView은 이미 스크롤되어 있으므로 NestedScrollview이 필요합니다.

+0

감사합니다. 나는 스크롤하지만 정말로 느리다. 스크롤을 움직이게하는 것은 정말로 쉽고 느리게해야한다. – Erik