I am trying to port an existing iPhone application to android. I wish to have a button scroll into view at the bottom of a GridView to enable the user to load more data from the server. Presently, my solution simply fixes a button at the bottom of the screen instead of having it scroll into view.
Here is my layout code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/grid"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:columnWidth="70dp"
android:numColumns="auto_fit"
android:verticalSpacing="0dp"
android:horizontalSpacing="0dp"
android:stretchMode="columnWidth"
android:gravity="center"
android:background="#000000"
/>
<Button
android:id="@+id/load_more"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Load More"
/>
</LinearLayout>
Fixing the button at the bottom of the screen won't work because I plan on placing an ad at the bottom.
Can anyone either explain conceptually how to get a load more button to scroll into view, or point me to some sample code, OR tell me why this is not idiomatic to Android and what other UI convention it uses to load more data in a GridView?
Thanks!