If I have a LinearLayout containing ImageViews, how could I write code to tell which, if any, is clipped by the edge of the screen?
<LinearLayout android:id="@+id/imagecontainer"
android:orientation="horizontal"
android:layoutHeight="wrap_content"
android:layoutWidth="fill_parent">
<ImageView android:id="@+id/image1" .../>
<ImageView android:id="@+id/image2" .../>
...
<ImageView android:id="@+id/imageN" .../>
</LinearLayout>
I imagine something like, which would return an index or 0 if nobody is clipped. The semantics of the function call aren't really important... I just need some way to tell if there is clipping and if so, who is it?
int whichImageIsClipped(LinearLayout root) { ... }