I have a custom horizontal scrollview defined as in xml:
<com.myapp.views.MyHorizontalScrollView
android:id="@+id/myScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/myLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
</LinearLayout>
</com.myapp.views.MyHorizontalScrollView>
I am dynamically inflating and adding child view to the linear layout (as above). This works nicely so far.
Also, I have extended the Horizontal scrollview. This is to add an onscroll listener which gives me onscroll event, and seems to be working
Question
When the user scrolls across on the scrollview, I need to determine if any of the views are now visible to the user i.e. shown on screen.
Also, I would like to determine the most centered view in scrollview (again that is visible to the user)
is this possible?