When a fragment opens, when scrolling up and down everything is very slow. What could be the reason?
<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.AppBarLayout android:id="@+id/main.appbar" android:layout_width="match_parent" android:layout_height="400dp" android:fitsSystemWindows="true" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/collapsBar" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:contentScrim="?attr/colorPrimary" app:expandedTitleMarginEnd="64dp" app:expandedTitleMarginStart="48dp" app:layout_scrollFlags="scroll|exitUntilCollapsed"> <ImageView android:id="@+id/img_artist" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" android:scaleType="centerCrop" android:src="@drawable/monro" app:layout_collapseMode="parallax" /> </android.support.design.widget.CollapsingToolbarLayout> </android.support.design.widget.AppBarLayout> <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:text="Имя" android:paddingLeft="10dp" android:layout_height="wrap_content" /> <EditText android:layout_width="wrap_content" android:text="Алена" android:paddingLeft="10dp" android:layout_height="wrap_content" /> <TextView android:id="@+id/albums_artist_info" android:layout_width="wrap_content" android:textSize="17dp" android:paddingLeft="10dp" android:text="Фамилия" android:layout_height="wrap_content" /> <EditText android:id="@+id/tracks_artist_info" android:layout_width="wrap_content" android:textSize="17dp" android:text="АБДУЛЫХОВА-ОГЛЫ" android:padding="10dp" android:layout_height="wrap_content" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="10dp" android:text="EMAIL" /> <EditText android:layout_width="wrap_content" android:paddingLeft="10dp" android:text="ALENKKKA87@GMAIL.COM" android:layout_height="wrap_content" /> <TextView android:layout_width="wrap_content" android:text="НОМЕР ТЕЛЕФОНА" android:layout_height="wrap_content" /> <EditText android:layout_width="wrap_content" android:text="+7 (932) 233-45-42" android:layout_height="wrap_content" /> <Switch android:id="@+id/monitored_switch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="32dip" android:text="Заморозить участие" /> <TextView android:layout_width="wrap_content" android:text="ВЫ МОЖЕТЕ ПРИОСТАНОВИТЬ УЧАСТИЕ В ПРОЕКТЕ. НОВАЯ ПРОГРАММА НЕ БУДЕТ ОТПРАВЛЕНА, ОТЧЕТ НЕ НУЖНО ЗАПОЛНЯТЬ." android:layout_height="wrap_content" /> <include layout="@layout/notification_card_view_profile"></include> </LinearLayout> </android.support.v4.widget.NestedScrollView> <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_centerInParent="true" android:layout_width="wrap_content" android:orientation="horizontal" android:layout_height="wrap_content"> <TextView android:layout_width="match_parent" android:text="Настройка уведомлений" android:layout_weight="1" android:layout_height="wrap_content" /> <ImageButton android:layout_width="match_parent" android:layout_weight="3" android:src="@drawable/notification" android:layout_height="match_parent" /> </LinearLayout> </RelativeLayout> </android.support.v7.widget.CardView>
paralaxelement - ermak0ff