I have a ScrollView that has some image Views. However, the scrolling is very slow and I do not understand what is the reason for the bad performance. Is there anything to do to speed up the scrolling ? or what can cause this problem ?
`
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView /> <ImageView /> <ImageView /> <ImageView /> <ImageView /> <ImageView /> </RelativeLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:gravity="center" android:orientation="vertical"> <Button /> </LinearLayout> </RelativeLayout> </ScrollView> </RelativeLayout>`
RelativeLayoutthere doesn't seem to be anything that would cause an issue. By "slow" do you mean it literally scrolls slowly or do you mean choppy and maybe problems with rendering when scrolling? How big are those images you are loading? If you are loading big images, maybe try reducing their file sizes?