Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You're going to have to use the Merge Layout thats proposed in the Android Dev guide.</p> <p>I have tried this out briefly using a GridView and TextView and has worked Pretty well. </p> <p>here is my code for merge.xml :</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;merge xmlns:android = "http://schemas.android.com/apk/res/android" &gt; &lt;GridView android:id = "@+id/gridview" android:layout_height = "fill_parent" android:layout_width = "fill_parent" android:columnWidth = "90dp" android:numColumns = "auto_fit" android:verticalSpacing = "10dp" android:horizontalSpacing = "10dp" android:stretchMode = "columnWidth" android:gravity = "center" android:background="#FFFFFF" /&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="20dip" android:layout_gravity="center_horizontal|bottom" android:padding="12dip" android:background="#AA000000" android:textColor="#ffffffff" android:text="Want to see more?" /&gt; &lt;/merge&gt; </code></pre> <p>In your Activity class you should do the following:</p> <pre><code> public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.merge); GridView gridView = (GridView) findViewById(R.id.gridview); gridView.setAdapter(new ImageAdapter(this)); </code></pre> <p>note: ImageAdapter is a custom adapter used to display images. Now Using some random pictures you can generate the following <a href="http://www.flickr.com/photos/58348205@N03/5357357286/" rel="nofollow">view</a>.</p> <p>Obviously you would need to change the TextView to some sort of a button and maybe disable any scrolling in the GridView for your idea to work well. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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