
I want to create two fragments in my activity. One shown in the lower part of the image is used to show the preview image of the content and the content is the detail view of the same.
The detail view should be horizontally swipable and centrally locked. I am going to provide the data through a array list and the detail view has a edit text which should be able to change the data in array list. If I use HorizontallScrollView, I will need to add one detail layout for each detail view with costly R… calls in a for loop and I don’t know how will I change the data set because I don’t know how will I know the position of the edit text.
I don’t know if implementing View pager will be of performance improvement or resource intense. Also how to get the position of edit text in that.
I tried both the approaches and found that using ViewPager is more efficient as my pages use more memory which is not recycled in Horizontal scroll view