ParallaxScroll
ParallaxScroll copied to clipboard
View out of sync when fragment is resumed
Hi I was using parallax scroll view which had a relative layout inside it and inside relative layout i had image having height and width to match parent and other view above the image view , when i scrolled the the we moving perfectly but after i moved to another fragment and the came back to this fragment the image view moved to top leaving blank space at bottom am when i scrolled they get back into position is their any way to solve the issue . I hav attached the images which shows the before and after state the first relative layout is of babyblue color and the second relative layout is of black color
<com.nirhart.parallaxscroll.views.ParallaxScrollView android:id="@+id/parentScrollView" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:fadingEdgeLength="15dp" app:inner_parallax_factor="1.9" app:parallax_factor="1.3" app:parallax_views_num="90" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="3dp"
android:background="@color/BabyBlue" >
<ImageView
android:id="@+id/iv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/loading"
android:scaleType="centerCrop" />
<View
android:id="@+id/div1"
android:layout_width="match_parent"
android:layout_height="2px"
android:layout_below="@+id/btnAudioTour"
android:layout_centerHorizontal="true"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginTop="30dp"
android:background="#F0FFFFFF" />
<TextView
android:id="@+id/tv"
style="@style/MonumentHeaderText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/btnAudioTour"
android:layout_marginTop="60dp"
android:text="Tourist Info" />
<LinearLayout
android:id="@+id/ll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/tvTouristInfo"
android:layout_marginTop="20dp"
android:orientation="horizontal"
android:weightSum="5" >
the image second is of the view before moving to next fragment and after returning to the current fragment the view changes to the first image
Same problem
@AnkSin Did you solve it?
nope, instead i used two scroll views and scrolled and scrolled the view at the back according to the scroll y of the view in front
Same problem. Has someone succeeded to solve it ?