에 대한 더 스크롤, 내가 디자인되지 않은 간단한 레이아웃은 다음과 같이 :안드로이드 5.X에 대한 RecyclerVivew (롤리팝)와 고투 RecyclerView 안드로이드 롤리팝 5.x를
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:baselineAligned="false"
android:orientation="horizontal"
android:weightSum="4">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tvAuditStartDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/to" />
<TextView
android:id="@+id/tvAuditEndDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.2"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tvAuditDepartmentName"
style="@style/TextviewPrimaryMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:lines="1" />
<TextView
android:id="@+id/tvSubItem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center" />
</LinearLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.2">
<TextView
android:id="@+id/tvAuditSubmitDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</FrameLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5">
<CheckBox
android:id="@+id/chkbAuditStatus"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:background="@drawable/check_box"
android:button="@android:color/transparent"
android:clickable="false"
android:gravity="end" />
</FrameLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray" />
</LinearLayout>
그리고 사용자 정의 RecyclerView.Adapter로, 그것에 부착 같은 항목 레이아웃 :
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical">
<LinearLayout
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="horizontal"
android:weightSum="4">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tvAuditStartDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/to" />
<TextView
android:id="@+id/tvAuditEndDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.2"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tvAuditDepartmentName"
style="@style/TextviewPrimaryMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:lines="1"/>
<TextView
android:id="@+id/tvSubItem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center" />
</LinearLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.2">
<TextView
android:id="@+id/tvAuditSubmitDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</FrameLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5">
<CheckBox
android:id="@+id/chkbAuditStatus"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:background="@drawable/check_box"
android:button="@android:color/transparent"
android:clickable="false"
android:gravity="end" />
</FrameLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray" />
</LinearLayout>
지금이 설정에 문제는 설치가 RecyclerView에는 스크롤을 초래하지 않기 때문에 5.X를 제외한 모든 안드로이드 버전에서 잘 작동한다. 또한 스크롤이 관찰자가 아니지만 다른 관찰에서 스피너와 같은 다른보기에서도 스크롤을 볼 수없는 유일한 경우는 아닙니다. 스피너의 경우 드롭 다운 목록이 표시되지만 선택한 항목이 UI에 반영되지 않습니다. 모든보기가 조각 내에서 부풀려 있습니다.
답장을 보내 주셔서 감사합니다. 그러나 나에게 도움이되지 않았고, 기본적으로 요점을 찾지 못했습니다. 'itemlayout'에'ScrollView'를 추가하면 어떻게 달라질 수 있습니까? – iSandeep
코드를 더 잘 이해할 수 있도록 메일 ID를 제공해 주시면보다 나은 솔루션을 제공 할 수있는 코드를 볼 수 있습니다. – yash786