Today, I'm very proud of myself to create simple gallery application in Android. Likewise, it's my so-called first ever Android application and I really like what I've done. Because, I'm very new at creating Android application and Java language. Now I feel that developing Android application isn't that difficult to do.
Objectives of this application is display thumbnail images at the first screen. Once click on these thumbnail images, the actual image will be displaying within in Dialog box.
First of all, I need to add some XML coding in main.xml for layout of my application under res/layout. Displaying thumnail photos as GridView format. That's why I've added the following GridView layout.
2
3<RelativeLayout android:id="@+id/RelativeLayout01"
4android:layout_width="fill_parent"
5android:layout_height="fill_parent"
6xmlns:android="http://schemas.android.com/apk/res/android">
7
8<GridView xmlns:android="http://schemas.android.com/apk/res/android"
9 android:id="@+id/gridview"
10 android:layout_width="fill_parent"
11 android:layout_height="fill_parent"
12 android:columnWidth="90dp"
13 android:numColumns="auto_fit"
14 android:verticalSpacing="10dp"
15 android:horizontalSpacing="10dp"
16 android:stretchMode="columnWidth"
17 android:gravity="center" />
18
19</RelativeLayout>

Android
Top of Page