{"id":1841,"date":"2013-01-21T18:07:58","date_gmt":"2013-01-21T16:07:58","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=1841"},"modified":"2013-01-30T19:04:23","modified_gmt":"2013-01-30T17:04:23","slug":"android-gridview-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/","title":{"rendered":"Android GridView Example"},"content":{"rendered":"<p>One of the most usefull layouts in Android is the <code>GridView<\/code>. <code>GridView <\/code>organizes the items of your screen in a two-dimensional array (a grid&#8230;). In this tutorial you are going to see two examples of <code>GridView<\/code>. In the first part we see the normal use of <code>GridView<\/code>. In the second part we create our own customized <code>GridView<\/code>.<\/p>\n<p>For this tutorial, we will use the following tools in a Windows 64-bit platform:<\/p>\n<ol>\n<li>JDK 1.7<\/li>\n<li>Eclipse 4.2 Juno<\/li>\n<li>Android SKD 4.2<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h3>Create a new Android Project<\/h3>\n<p>Open Eclipse IDE and go to File -&gt; New -&gt; Project -&gt; Android -&gt; Android Application Project and click Next.<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/create-new-project6.jpg\"><img decoding=\"async\" title=\"create-new-project\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/create-new-project6.jpg\" alt=\"\" width=\"467\" height=\"460\" \/><\/a><\/p>\n<p>You have to specify the Application Name, the Project Name and the Package name in the appropriate text fields and then click Next.<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/create-new-project-attributes6.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1843\" title=\"create-new-project-attributes\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/create-new-project-attributes6.jpg\" alt=\"\" width=\"571\" height=\"442\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/create-new-project-attributes6.jpg 571w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/create-new-project-attributes6-300x232.jpg 300w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/a><\/p>\n<p>In the next window make sure the \u201cCreate activity\u201d option is selected in order to create a new activity for your project, and click Next. This is optional as you can create a new activity after creating the project, but you can do it all in one step.<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/check-create-new-activity13.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1844\" title=\"check-create-new-activity\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/check-create-new-activity13.jpg\" alt=\"\" width=\"567\" height=\"484\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/check-create-new-activity13.jpg 567w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/check-create-new-activity13-300x256.jpg 300w\" sizes=\"(max-width: 567px) 100vw, 567px\" \/><\/a><\/p>\n<p>Select \u201cBlankActivity\u201d and click Next.<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/create-blanc-activity.jpg\"><img decoding=\"async\" title=\"create-blanc-activity\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/create-blanc-activity.jpg\" alt=\"\" width=\"535\" height=\"485\" \/><\/a><\/p>\n<p>You will be asked to specify some information about the new activity. \u00a0In the Layout Name text field you have to specify the name of the file that will contain the layout description of your app. In our case the file\u00a0<code>res\/layout\/main.xml<\/code>\u00a0will be created. Then, click Finish.<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/create-new-activity-attributes3.jpg\"><img decoding=\"async\" title=\"create-new-activity-attributes\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/create-new-activity-attributes3.jpg\" alt=\"\" width=\"625\" height=\"452\" \/><\/a><\/p>\n<h3><span style=\"text-decoration: underline;\">Normal GridView Example<\/span><\/h3>\n<h3>1.Create the main layout<\/h3>\n<p>Open\u00a0<code>res\/layout\/main.xml<\/code>\u00a0file :<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-layout1.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1845\" title=\"package-explorer--main-layout\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-layout1.jpg\" alt=\"\" width=\"342\" height=\"433\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-layout1.jpg 342w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-layout1-236x300.jpg 236w\" sizes=\"(max-width: 342px) 100vw, 342px\" \/><\/a><\/p>\n<p>And paste the following code :<\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;GridView xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    android:id=\"@+id\/gridView\"\r\n    android:layout_width=\"fill_parent\"\r\n    android:layout_height=\"fill_parent\"\r\n    android:columnWidth=\"50dp\"\r\n    android:gravity=\"center\"\r\n    android:numColumns=\"auto_fit\"\r\n    android:stretchMode=\"columnWidth\" &gt;\r\n\r\n&lt;\/GridView&gt;<\/pre>\n<h3>2. Code<\/h3>\n<p>Go to the java file that contains the code of the activity\u00a0you\u2019ve\u00a0just created:<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-source-file.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1846\" title=\"package-explorer--main-source-file\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-source-file.jpg\" alt=\"\" width=\"430\" height=\"300\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-source-file.jpg 430w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-source-file-300x209.jpg 300w\" sizes=\"(max-width: 430px) 100vw, 430px\" \/><\/a><\/p>\n<p>And paste the following code:<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.android.androidgridviewexample;\r\n\r\nimport android.app.Activity;\r\nimport android.os.Bundle;\r\nimport android.widget.AdapterView;\r\nimport android.widget.ArrayAdapter;\r\nimport android.widget.GridView;\r\nimport android.widget.TextView;\r\nimport android.widget.Toast;\r\nimport android.view.View;\r\nimport android.widget.AdapterView.OnItemClickListener;\r\n\r\npublic class MainActivity extends Activity {\r\n\r\n\tGridView grid;\r\n\r\n\tstatic final String[] letters = new String[] { \r\n\t\t\t\"A\", \"B\", \"C\", \"D\", \"E\",\r\n\t\t\t\"F\", \"G\", \"H\", \"I\", \"J\",\r\n\t\t\t\"K\", \"L\", \"M\", \"N\", \"O\",\r\n\t\t\t\"P\", \"Q\", \"R\", \"S\", \"T\",\r\n\t\t\t\"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"};\r\n\r\n\t@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\tsetContentView(R.layout.main);\r\n\r\n\t\tgrid = (GridView) findViewById(R.id.gridView);\r\n\r\n\t\tArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, letters);\r\n\r\n\t\tgrid.setAdapter(adapter);\r\n\r\n\t\tgrid.setOnItemClickListener(new OnItemClickListener() {\r\n\t\t\tpublic void onItemClick(AdapterView parent, View v, int position, long id) {\r\n\t\t\t   Toast.makeText(getApplicationContext(),\r\n\t\t\t\t((TextView) v).getText(), Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}\r\n\r\n}<\/pre>\n<h3>3. Run the application<\/h3>\n<p>Go ahead and run the application to see how the layout looks on your emulator. This is the main screen of our application:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/main-screen-simple.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1847\" title=\"main-screen-simple\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/main-screen-simple.jpg\" alt=\"\" width=\"256\" height=\"470\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/main-screen-simple.jpg 256w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/main-screen-simple-163x300.jpg 163w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/a><\/p>\n<p>And when you click on a letter:<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/item-clicked1.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1848\" title=\"item-clicked\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/item-clicked1.jpg\" alt=\"\" width=\"256\" height=\"470\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/item-clicked1.jpg 256w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/item-clicked1-163x300.jpg 163w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/a><\/p>\n<h3>Download Eclipse Project<\/h3>\n<p>This was the first part of the Android GridView Example. Download the Eclipse Project of the first part of this tutorial:\u00a0<a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/AndroidGridViewExample_1.zip\">AndroidGridViewExample_1.zip<\/a><\/p>\n<h3><span style=\"text-decoration: underline;\"><strong>Custom GridView Example<\/strong><\/span><\/h3>\n<p>For this part you can create a new Android Project if you want, but I\u2019m going to use the old one.<\/p>\n<h3>1. Create the custom Layout<\/h3>\n<p>The first thing you have to do for this part is to create a new xml Layout file that will describe the Layout of our custom GridView.<\/p>\n<p>Go to the Package Explorer and right click on the\u00a0<code>res\/layout\u00a0<\/code>folder. Select New -&gt; Other -&gt; Android -&gt; Android XML Layout File. And click Next:<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/new-layout-xml-file.jpg\"><img decoding=\"async\" title=\"new-layout-xml-file\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/new-layout-xml-file.jpg\" alt=\"\" width=\"517\" height=\"493\" \/><\/a><\/p>\n<p>Then specify the name of the file and the Layout type and click Finish:<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/new-layout-file.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1850\" title=\"new-layout-file\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/new-layout-file.jpg\" alt=\"\" width=\"491\" height=\"413\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/new-layout-file.jpg 491w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/new-layout-file-300x252.jpg 300w\" sizes=\"(max-width: 491px) 100vw, 491px\" \/><\/a><\/p>\n<p>As you will see in the Package Explorer the new\u00a0<code>\/res\/layout\/countries.xml<\/code>\u00a0file has been created:<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-countries-layout.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1851\" title=\"package-explorer--countries-layout\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-countries-layout.jpg\" alt=\"\" width=\"340\" height=\"475\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-countries-layout.jpg 340w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-countries-layout-214x300.jpg 214w\" sizes=\"(max-width: 340px) 100vw, 340px\" \/><\/a><\/p>\n<p>Open that file and paste the following code :<\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    android:layout_width=\"wrap_content\"\r\n    android:layout_height=\"wrap_content\"\r\n    android:padding=\"5dp\" &gt;\r\n\r\n    &lt;ImageView\r\n        android:id=\"@+id\/flag\"\r\n        android:layout_width=\"50sp\"\r\n        android:layout_height=\"50sp\"\r\n        android:layout_marginRight=\"10sp\"&gt;\r\n    &lt;\/ImageView&gt;\r\n\r\n    &lt;TextView\r\n        android:id=\"@+id\/label\"\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:text=\"@+id\/label\"\r\n        android:layout_marginTop=\"15sp\"\r\n        android:textSize=\"15sp\" &gt;\r\n    &lt;\/TextView&gt;\r\n\r\n&lt;\/LinearLayout&gt;<\/pre>\n<p>Now, go back to the <code>\/res\/layout\/main.xml<\/code> and paste the following code :<\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;GridView xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    android:id=\"@+id\/gridView\"\r\n    android:numColumns=\"auto_fit\"\r\n    android:gravity=\"center\"\r\n    android:columnWidth=\"160dp\"\r\n    android:stretchMode=\"columnWidth\"\r\n    android:layout_width=\"fill_parent\"\r\n    android:layout_height=\"fill_parent\" &gt;\r\n\r\n&lt;\/GridView&gt;<\/pre>\n<h3>2. Adding pictures in the appropriate project folder<\/h3>\n<p>As you would have noticed in the Package explorer, there are 4 folders that contain the image resources of the project :<\/p>\n<ol>\n<li><code>res\/drawable-hdpi<\/code><\/li>\n<li><code>res\/drawable-ldpi<\/code><\/li>\n<li><code>res\/drawable-mdpi<\/code><\/li>\n<li><code>res\/drawable-hdpi<\/code><\/li>\n<\/ol>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/drawble-folders.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1852\" title=\"drawble-folders\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/drawble-folders.jpg\" alt=\"\" width=\"350\" height=\"379\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/drawble-folders.jpg 350w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/drawble-folders-277x300.jpg 277w\" sizes=\"(max-width: 350px) 100vw, 350px\" \/><\/a><\/p>\n<p>You can copy the images you want to put in you\u2019re application in any one of these folders. \u00a0Android SDK will automatically\u00a0recognize any images you put on any one of these folders as drawable resources. So, copy the images\u00a0in the folder you want. If the image does not appear in the Package Explorer under the folder\u00a0you\u2019ve\u00a0copied it into, right click on the project name and select\u00a0Refresh. Now the image should be under the correct folder. As you can see,\u00a0I have four images in\u00a0<code>res\/drawable-hdpi<\/code>:<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-images1.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1853\" title=\"package-explorer-images\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-images1.jpg\" alt=\"\" width=\"340\" height=\"438\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-images1.jpg 340w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-images1-232x300.jpg 232w\" sizes=\"(max-width: 340px) 100vw, 340px\" \/><\/a><\/p>\n<h3>3. Create a Custom ArrayAdapter<\/h3>\n<p>To create a custom\u00a0<code>GridView\u00a0<\/code>you have to make your own\u00a0<code>BaseAdapter<\/code>. To do that you have to to create a new class that will extend <code>BaseAdapter<\/code>.<\/p>\n<p>Go to the Package Explorer and right click on the package (in our case com.javacodegeeks.android.androidgridvieexample):<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-source-file1.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1854\" title=\"package-explorer--main-source-file\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-source-file1.jpg\" alt=\"\" width=\"430\" height=\"300\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-source-file1.jpg 430w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-main-source-file1-300x209.jpg 300w\" sizes=\"(max-width: 430px) 100vw, 430px\" \/><\/a><\/p>\n<p>Select New -&gt; Class. Put the\u00a0appropriate\u00a0attributes as shown in the\u00a0picture\u00a0below:<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/create-new-cliass.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1855\" title=\"create-new-cliass\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/create-new-cliass.jpg\" alt=\"\" width=\"536\" height=\"623\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/create-new-cliass.jpg 536w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/create-new-cliass-258x300.jpg 258w\" sizes=\"(max-width: 536px) 100vw, 536px\" \/><\/a><\/p>\n<p>As you will see a new java file has been created:<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-adapter-source-file.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1856\" title=\"package-explorer--adapter-source-file\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-adapter-source-file.jpg\" alt=\"\" width=\"444\" height=\"275\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-adapter-source-file.jpg 444w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/package-explorer-adapter-source-file-300x185.jpg 300w\" sizes=\"(max-width: 444px) 100vw, 444px\" \/><\/a><\/p>\n<p>Open that file and paste the following code :<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.android.androidgridviewexample;\r\n\r\nimport android.content.Context;\r\nimport android.view.LayoutInflater;\r\nimport android.view.View;\r\nimport android.view.ViewGroup;\r\nimport android.widget.BaseAdapter;\r\nimport android.widget.ImageView;\r\nimport android.widget.TextView;\r\n\r\npublic class MyAdapter extends BaseAdapter {\r\n\tprivate Context context;\r\n\tprivate final String[] countries;\r\n\r\n\tpublic MyAdapter(Context context, String[] countries) {\r\n\t\tthis.context = context;\r\n\t\tthis.countries = countries;\r\n\t}\r\n\r\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\r\n\r\n\t\tLayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n\r\n\t\tView gridView;\r\n\r\n\t\tif (convertView == null) {\r\n\r\n\t\t\tgridView = new View(context);\r\n\r\n\t\t\tgridView = inflater.inflate(R.layout.countries, null);\r\n\r\n\t\t\tTextView textView = (TextView) gridView.findViewById(R.id.label);\r\n\r\n\t\t\ttextView.setText(countries[position]);\r\n\r\n\t\t\tImageView flag = (ImageView) gridView .findViewById(R.id.flag);\r\n\r\n\t\t\tString mobile = countries[position];\r\n\r\n\t\t\tif (mobile.equals(\"Greece\")) {\r\n\t\t\t\tflag.setImageResource(R.drawable.greekflag);\r\n\t\t\t} else if (mobile.equals(\"Germany\")) {\r\n\t\t\t\tflag.setImageResource(R.drawable.germanflag);\r\n\t\t\t} else if (mobile.equals(\"Italy\")) {\r\n\t\t\t\tflag.setImageResource(R.drawable.italianflag);\r\n\t\t\t} else {\r\n\t\t\t\tflag.setImageResource(R.drawable.britishflag);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tgridView = (View) convertView;\r\n\t\t}\r\n\r\n\t\treturn gridView;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic int getCount() {\r\n\t\treturn countries.length;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic Object getItem(int position) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic long getItemId(int position) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n}<\/pre>\n<p>Now, go back to <code>MainActivity.java<\/code> and paste the following code :<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.android.androidgridviewexample;\r\n\r\nimport android.app.Activity;\r\nimport android.os.Bundle;\r\nimport android.widget.AdapterView;\r\nimport android.widget.GridView;\r\nimport android.widget.TextView;\r\nimport android.widget.Toast;\r\nimport android.view.View;\r\nimport android.widget.AdapterView.OnItemClickListener;\r\n\r\npublic class MainActivity extends Activity {\r\n\r\n\tGridView gridView;\r\n\r\n\tstatic final String[] MOBILE_OS = new String[] { \"Greece\", \"Germany\",\"Italy\", \"Britain\" };\r\n\r\n\t@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.main);\r\n\r\n\t\tgridView = (GridView) findViewById(R.id.gridView);\r\n\r\n\t\tgridView.setAdapter(new MyAdapter(this, MOBILE_OS));\r\n\r\n\t\tgridView.setOnItemClickListener(new OnItemClickListener() {\r\n\t\t\tpublic void onItemClick(AdapterView parent, View v,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\tgetApplicationContext(),\r\n\t\t\t\t\t\t((TextView) v.findViewById(R.id.label)).getText(), Toast.LENGTH_SHORT).show();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}\r\n\r\n}<\/pre>\n<h3>4. Run the application<\/h3>\n<p>This is the main screen of our Application:<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/main-screen-custom1.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1857\" title=\"main-screen-custom\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/main-screen-custom1.jpg\" alt=\"\" width=\"256\" height=\"470\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/main-screen-custom1.jpg 256w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/main-screen-custom1-163x300.jpg 163w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/a><\/p>\n<p>Now, when you click on an item:<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/item-clicked-custom.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1858\" title=\"item-clicked-custom\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/item-clicked-custom.jpg\" alt=\"\" width=\"256\" height=\"470\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/item-clicked-custom.jpg 256w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/item-clicked-custom-163x300.jpg 163w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/a><\/p>\n<h3>Download Eclipse Project<\/h3>\n<p>This was the second part of the Android GridView Example. Download the Eclipse Project of the second part of this tutorial:\u00a0<a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/01\/AndroidGridViewExample_2.zip\">AndroidGridViewExample_2.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most usefull layouts in Android is the GridView. GridView organizes the items of your screen in a two-dimensional array (a grid&#8230;). In this tutorial you are going to see two examples of GridView. In the first part we see the normal use of GridView. In the second part we create our own &hellip;<\/p>\n","protected":false},"author":6,"featured_media":1202,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[308],"tags":[265,292,267],"class_list":["post-1841","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gridview","tag-android-core","tag-android-gridview","tag-android-ui"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Android GridView Example<\/title>\n<meta name=\"description\" content=\"One of the most usefull layouts in Android is the GridView. GridView organizes the items of your screen in a two-dimensional array (a grid...). In this\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android GridView Example\" \/>\n<meta property=\"og:description\" content=\"One of the most usefull layouts in Android is the GridView. GridView organizes the items of your screen in a two-dimensional array (a grid...). In this\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2013-01-21T16:07:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-01-30T17:04:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Byron Kiourtzoglou\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Byron Kiourtzoglou\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/\"},\"author\":{\"name\":\"Byron Kiourtzoglou\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015\"},\"headline\":\"Android GridView Example\",\"datePublished\":\"2013-01-21T16:07:58+00:00\",\"dateModified\":\"2013-01-30T17:04:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/\"},\"wordCount\":703,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"keywords\":[\"Android Core\",\"Android GridView\",\"Android UI\"],\"articleSection\":[\"GridView\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/\",\"name\":\"Android GridView Example\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"datePublished\":\"2013-01-21T16:07:58+00:00\",\"dateModified\":\"2013-01-30T17:04:23+00:00\",\"description\":\"One of the most usefull layouts in Android is the GridView. GridView organizes the items of your screen in a two-dimensional array (a grid...). In this\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/android\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"core\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/android\/core\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"ui\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/android\/core\/ui\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"GridView\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/android\/core\/ui\/gridview\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"Android GridView Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015\",\"name\":\"Byron Kiourtzoglou\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg\",\"caption\":\"Byron Kiourtzoglou\"},\"description\":\"Byron is a master software engineer working in the IT and Telecom domains. He is an applications developer in a wide variety of applications\/services. He is currently acting as the team leader and technical architect for a proprietary service creation and integration platform for both the IT and Telecom industries in addition to a in-house big data real-time analytics solution. He is always fascinated by SOA, middleware services and mobile development. Byron is co-founder and Executive Editor at Java Code Geeks.\",\"sameAs\":[\"https:\/\/www.pivotalgamers.com\/\",\"https:\/\/www.linkedin.com\/in\/byron-kiourtzoglou-530ab222\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/byron-kiourtzoglou\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android GridView Example","description":"One of the most usefull layouts in Android is the GridView. GridView organizes the items of your screen in a two-dimensional array (a grid...). In this","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/","og_locale":"en_US","og_type":"article","og_title":"Android GridView Example","og_description":"One of the most usefull layouts in Android is the GridView. GridView organizes the items of your screen in a two-dimensional array (a grid...). In this","og_url":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-01-21T16:07:58+00:00","article_modified_time":"2013-01-30T17:04:23+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","type":"image\/jpeg"}],"author":"Byron Kiourtzoglou","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Byron Kiourtzoglou","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/"},"author":{"name":"Byron Kiourtzoglou","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015"},"headline":"Android GridView Example","datePublished":"2013-01-21T16:07:58+00:00","dateModified":"2013-01-30T17:04:23+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/"},"wordCount":703,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","keywords":["Android Core","Android GridView","Android UI"],"articleSection":["GridView"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/","url":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/","name":"Android GridView Example","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","datePublished":"2013-01-21T16:07:58+00:00","dateModified":"2013-01-30T17:04:23+00:00","description":"One of the most usefull layouts in Android is the GridView. GridView organizes the items of your screen in a two-dimensional array (a grid...). In this","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/gridview\/android-gridview-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Android","item":"https:\/\/examples.javacodegeeks.com\/category\/android\/"},{"@type":"ListItem","position":3,"name":"core","item":"https:\/\/examples.javacodegeeks.com\/category\/android\/core\/"},{"@type":"ListItem","position":4,"name":"ui","item":"https:\/\/examples.javacodegeeks.com\/category\/android\/core\/ui\/"},{"@type":"ListItem","position":5,"name":"GridView","item":"https:\/\/examples.javacodegeeks.com\/category\/android\/core\/ui\/gridview\/"},{"@type":"ListItem","position":6,"name":"Android GridView Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015","name":"Byron Kiourtzoglou","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg","caption":"Byron Kiourtzoglou"},"description":"Byron is a master software engineer working in the IT and Telecom domains. He is an applications developer in a wide variety of applications\/services. He is currently acting as the team leader and technical architect for a proprietary service creation and integration platform for both the IT and Telecom industries in addition to a in-house big data real-time analytics solution. He is always fascinated by SOA, middleware services and mobile development. Byron is co-founder and Executive Editor at Java Code Geeks.","sameAs":["https:\/\/www.pivotalgamers.com\/","https:\/\/www.linkedin.com\/in\/byron-kiourtzoglou-530ab222"],"url":"https:\/\/examples.javacodegeeks.com\/author\/byron-kiourtzoglou\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1841"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1841\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1202"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}