i have a textview and imageview inside a linearlayout. textview containes more text so my screen size exceeds. so i am placing linearlayout inside a scrollview. now when i scroll the to the end of scrollView and changed the orientation from portrait to landscape and came back to portrait mode with out changing the position, the scroll position gets changed. to handle it in onSaveInstanceState and retain it back, my activity is in tab layout and its not getting called. so can some one help me on this to place to the same position(end of scrollView) to where i am before changing the orientation.
That is the bug in android ScrollView-v2.1, and ScrollView doesn't have scrollChangedListener. so we have to write CustomScrollView by extending from ScrollView class. Then write and implement scrollChangedListener Interface for the CustomScrollView and override onScrollChanged() method to listen for change in the scroll position of the CustomScrollView.