현재 Android 6 용 Java로 작성된 학교의 학년 관리자로 일하고 있습니다. 이제 막 Android로 시작 했으므로 전문가가 아닙니다.Android Recycler보기 notifyItemRemoved 애니메이션이 끊어졌습니다.
문제점 : 애니메이션이의 절단
내 RecycleView 어댑터의 방법 notifyItemRemoved()
오른쪽 상단 곳으로 왼쪽 하단의 장소에서 마지막 CardView 이동 전화하면이보기의 크기가 조절된다.
이제 RecycleView의 layout_height
특성이 match_parent
이기 때문에보기의 크기가 조정 된 이유를 알 수 없습니다.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".SemesterActivity"
tools:showIn="@layout/activity_semester">
<android.support.v7.widget.RecyclerView
android:id="@+id/subject_list_view"
android:padding="20dp"
android:layout_below="@+id/title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"/>
</android.support.v4.widget.NestedScrollView>
은 내가 RecycleView에 대한 LayoutManager에 같은
GridLayoutManager
했다.
SubjectAdapterObj.notifyItemRemoved(viewHolder.getAdapterPosition());
애니메이션이 기본 애니메이션입니다 : 내가 RecycleView를 업데이트하는 방법
subjectListView.setLayoutManager(new GridLayoutManager(ActivityContext, 2));
.
GridLayoutManager
은 문제가 될 수 있습니까?
비디오 예 :
죄송합니다. 영어가 제 모국어가 아닙니다.
사용중인 recyclerview 버전은 무엇입니까? – Abbas
recycleview-v7-23.4.0 그것이 무슨 뜻입니까? – Velrest
'RecyclerView'의'onMeasure'를 무시하고 max-height를 설정하십시오. – Abbas