Skip to content

Instantly share code, notes, and snippets.

@ziedrebhi
Last active August 29, 2015 14:07
Show Gist options
  • Save ziedrebhi/199bb620af43daa11d39 to your computer and use it in GitHub Desktop.
Save ziedrebhi/199bb620af43daa11d39 to your computer and use it in GitHub Desktop.
<!--
/* Tuto Custom GridView Android
* @author Zied Rebhi
* http://www.tutozone.info
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<EditText
android:id="@+id/search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Search something.." >
<requestFocus />
</EditText>
<GridView
android:gravity="center"
android:columnWidth="100dp"
android:stretchMode="columnWidth"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/grid"
android:horizontalSpacing="1dp"
android:numColumns="auto_fit"
android:verticalSpacing="1dp"
/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment