2016-11-17 4 views
0

나는이 문제를 며칠 동안 보았고 여기 저기를 살펴보고 작동하지 않는 것들을 많이 시도했다. 기본적으로 내 RecyclerView 여기 Look at bottom and top of each text underneath My favourite topicsRecyclerView 항목 갭이 너무 크다

의 항목 사이에 큰 차이가 있어요 나의 RecyclerView

<android.support.v7.widget.RecyclerView 
    android:id="@+id/favouriteTopicRecycler" 
    android:layout_width="match_parent" 
    android:layout_height="150dp" 
    android:paddingStart="12dp" 
    android:layout_marginTop="10dp" 
    android:visibility="gone"/> 

를위한 코드이고 여기 정말 '돈 RecyclerView

<TextView 
    android:id="@+id/favTextView" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:textColor="@android:color/white" 
    android:background="@android:color/transparent" 
    android:textSize="12sp" 
    android:clickable="true" /> 

에 대한 목록 항목의 내가 뭘 잘못하고 있는지 알지? 누구도 도와 줄 수 있니? 미리 감사드립니다.

+0

목록 항목의 상위 태그는 높이가 match_parent입니까? 그렇다면 wrap_content로 만들어 문제가 해결됩니다. –

+0

감사합니다. @RakshitNawani! – BilalMH

답변

1

목록 항목 높이의 부모 태그가 match_parent입니까? 그렇다면 wrap_content으로 만들고 문제가 해결됩니다. 리사이클 뷰의 업데이트 된 그라디언트에서는 항목이 match parent 인 경우 wrap_content를 수행하여 전체 페이지 높이를 차지하므로 문제가 해결됩니다.