Based on Jack K Fouani. Some changes that will save entire image from cropping:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<!-- Large Image -->
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<!-- //Large Image -->
<!-- Small Images -->
<GridView
android:id="@+id/list"
android:numColumns="auto_fit"
android:columnWidth="120dip"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="0dip" >
</GridView>
<!-- Small Images -->
</LinearLayout>
A fast solution, others have a lot of work, try it. you may like it.
GridView gv = findViewById(R.id.list);
gv.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
// TODO Auto-generated method stub
}
@Override
public void onScroll(AbsListView arg0, int firstVisibleItem, int arg2, int arg3) {
// TODO Auto-generated method stub
ImageView iView = findViewById(R.id.image);
if (firstVisibleItem == 0)
{
iView.setVisibility(View.VISIBLE);
}
else
{
iView.setVisibility(View.Gone);
}
}
});