Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Use the same as the below:</p> <p>Edited:</p> <pre><code>&lt;FrameLayout android:id="@+id/linear_Layout_List" android:layout_gravity="center_horizontal|top|bottom" android:layout_marginTop="90dip" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="60dip" android:background="#E4E4E4"&gt; &lt;GridView android:layout_width="fill_parent" android:layout_gravity="center_horizontal|top|bottom" android:columnWidth="90dp" android:numColumns="3" android:horizontalSpacing="10dp" android:stretchMode="columnWidth" android:gravity="center" android:id="@+id/Search_Result_Grid" android:background="#E4E4E4" android:focusable="true" android:verticalSpacing="10dp" android:layout_height="wrap_content" android:layout_marginBottom="45dip"&gt; &lt;/GridView&gt; &lt;Button android:id="@+id/txt_LoadMoreGrid" android:layout_width="fill_parent" android:layout_gravity="center_horizontal|bottom" android:layout_height="wrap_content" android:text="Load More...." android:clickable="true" android:textColor="#ffffff" android:visibility="invisible" android:background="@drawable/top_bar_bg"&gt;&lt;/Button&gt; &lt;/FrameLayout&gt; </code></pre> <p>and Call the onScroll method to hide the same as you want...........this implementation for LOAD MORE functionality in GridView.............It works for me.</p> <pre><code>grid.setOnScrollListener(new OnScrollListener() { @Override public void onScrollStateChanged(AbsListView view, int scrollState) { } @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { System.out.println("The first visible Item:"+firstVisibleItem); if(width&lt;=320 &amp;&amp; height&lt;=480) { if(firstVisibleItem+5==totalItemCount-1) { /*FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT,FrameLayout.LayoutParams.WRAP_CONTENT,Gravity.NO_GRAVITY); layoutParams.setMargins(0, 0, 0, 45); grid.setLayoutParams(layoutParams);*/ tv_Load.setVisibility(tv_Load.VISIBLE); } else { /* FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT,FrameLayout.LayoutParams.WRAP_CONTENT,Gravity.NO_GRAVITY); layoutParams.setMargins(0, 0, 0, 0); grid.setLayoutParams(layoutParams);*/ tv_Load.setVisibility(tv_Load.GONE); } } else { if(firstVisibleItem+8==totalItemCount-1) { /*FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT,FrameLayout.LayoutParams.WRAP_CONTENT,Gravity.NO_GRAVITY); layoutParams.setMargins(0, 0, 0, 45); grid.setLayoutParams(layoutParams);*/ tv_Load.setVisibility(tv_Load.VISIBLE); } else { /* FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT,FrameLayout.LayoutParams.WRAP_CONTENT,Gravity.NO_GRAVITY); layoutParams.setMargins(0, 0, 0, 0); grid.setLayoutParams(layoutParams);*/ tv_Load.setVisibility(tv_Load.GONE); } } } }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload