{"id":338,"date":"2010-12-06T20:57:00","date_gmt":"2010-12-06T20:57:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/android-full-app-part-7-using-options-menus-and-customized-dialogs-for-user-interaction.html"},"modified":"2012-10-21T19:24:30","modified_gmt":"2012-10-21T19:24:30","slug":"android-full-app-part-7-options-menus","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html","title":{"rendered":"Android Full App, Part 7: Using options menus and customized dialogs for user interaction"},"content":{"rendered":"<p>This is the seventh part of the <a href=\"http:\/\/www.javacodegeeks.com\/2010\/10\/android-full-application-tutorial.html\">\u201cAndroid Full Application Tutorial\u201d<\/a> series. The complete application aims to provide an easy way of performing movies\/actors searching over the internet. In the first part of the series (<a href=\"http:\/\/www.javacodegeeks.com\/2010\/10\/android-full-app-part-1-main-activity.html\">\u201cMain Activity UI\u201d<\/a>), we created the Eclipse project and set up a basic interface for the main activity of the application. In the second part (<a href=\"http:\/\/www.javacodegeeks.com\/2010\/10\/android-full-app-part-2-using-http-api.html\">\u201cUsing the HTTP API\u201d<\/a>), we used the Apache HTTP client library in order to consume an external HTTP API and  integrate the API&#8217;s searching capabilities into our application. In the third part (<a href=\"http:\/\/www.javacodegeeks.com\/2010\/10\/android-full-app-part-3-parsing-xml.html\">\u201cParsing the XML response\u201d<\/a>) we saw how to parse the XML response using Android&#8217;s built-in XML parsing capabilities. In the fourth part (<a href=\"http:\/\/www.javacodegeeks.com\/2010\/10\/android-full-app-part-4-asynchronous.html\">\u201cPerforming the API request asynchronously from the main activity\u201d<\/a>), we tied together the HTTP retriever and XML parser services in order to perform the API search request from our application&#8217;s main activity. The request was executed asynchronously in a background thread in order to avoid blocking the main UI thread. In the fifth part (<a href=\"http:\/\/www.javacodegeeks.com\/2010\/11\/android-full-app-part-5-launch-activity.html\">\u201cLaunching new activities with intents\u201d<\/a>), we saw how to launch a new <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html\">Activity<\/a> and how to transfer data from one <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html\">Activity<\/a> to another. In the sixth part, (<a href=\"http:\/\/www.javacodegeeks.com\/2010\/11\/android-full-app-part-6-customized-list.html\">\u201cCustomized list view for data presentation\u201d<\/a>) we created a custom list view in order to provide a better data visual presentation. In this part, we are going to create options menus and custom dialogs in order to facilitate better user interaction.<\/p>\n<p>When developing applications for mobile devices which are rather limited in terms of resources (either CPU, memory or screen size), we should strive to make the most out of the available screen real-estate. In Android, one way of taking full advantage of the screen dimensions is using an options menu when the available options have to be presented to the user. As you can see in the following image, under  normal operations, the options are not visible to the user, and only after he prompts for them shall they appear. When that happens, the menu is placed to the foreground, meaning that it \u201chides\u201d any other UI element that exists underneath it.<\/p>\n<p><a href=\"http:\/\/3.bp.blogspot.com\/_piNjpdpJZXA\/TP0tzEkfo5I\/AAAAAAAAANA\/_0vtiandLog\/s1600\/01-options-menu.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/_piNjpdpJZXA\/TP0tzEkfo5I\/AAAAAAAAANA\/_0vtiandLog\/s320\/01-options-menu.png\" style=\"cursor: pointer;height: 300px;margin: 0px auto 10px;text-align: center;width: 200px\" \/><\/a><\/p>\n<p>One particular aspect of creating and using Android menus is that they provide a familiar interface for the user to access application functions and settings. In other words, don&#8217;t re-invent the wheel, just use the built-in functionality when you wish to create a menu. The official Android documentation page includes a comprehensive guide to <a href=\"http:\/\/developer.android.com\/guide\/topics\/ui\/menus.html\">Creating Menus<\/a>. In this tutorial, we will see the fastest and most straightforward way to create menus and populate them with the appropriate options.<\/p>\n<p>The main class around which the options menus are built is, not surprisingly, named <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/Menu.html\">Menu<\/a>. It is actually an interface for managing the items in a menu. By default, every <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html\">Activity<\/a> supports an options menu of actions or options. More specifically, the Android <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html\">Activity<\/a> class provides a method named onCreateOptionsMenu, which can be used to initialize the contents of the activity&#8217;s standard options menu. When overriding that method, we typically use the <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/Menu.html#add%28int,%20int,%20int,%20int%29\">add<\/a> method in order to add new items to the menu. Notice that the add method, and <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/Menu.html#add%28int%29\">its<\/a> <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/Menu.html#add%28int,%20int,%20int,%20java.lang.CharSequence%29\">variations<\/a>, return a <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/MenuItem.html\">MenuItem<\/a> object, which is an interface for direct access to a previously created menu item. A <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/MenuItem.html\">MenuItem<\/a> can contain both a title and an icon.<\/p>\n<p>The itemId argument of the add method is the one that will allow us to figure out what options has been selected. In general, to handle events such as the user selecting a menu option, we need to override the <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onOptionsItemSelected%28android.view.MenuItem%29\">onOptionsItemSelected<\/a> method of our <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html\">Activity<\/a>. That method contains a reference to the <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/MenuItem.html\">MenuItem<\/a> that was selected and we can use the <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/MenuItem.html#getItemId%28%29\">getItemId<\/a> method in order to find its identifier. Thus, we are now in position to know what the user has selected.<\/p>\n<p>In our application, we will use an options menu in order to allow the user to either visit the IMDB page of a specific movie, or to view its poster image in a new window. We first define the Ids of the available items and then create the menu by adding menu items to the menu. Note that we use both a title and an icon for our menu items. Finally, when an option is selected, we check the menu item ID in order to find out what action has to be performed. Here are some code snippets for all the above:<\/p>\n<pre class=\"brush:java\">private static final int ITEM_VISIT_IMDB = 0;\r\nprivate static final int ITEM_VIEW_FULL_IMAGE = 1;\r\n...\r\n@Override\r\npublic boolean onCreateOptionsMenu(Menu menu) {\r\n    menu.add(Menu.NONE, ITEM_VISIT_IMDB, 0, \r\n        getString(R.string.visit_imdb)).setIcon(android.R.drawable.ic_menu_set_as);\r\n    menu.add(Menu.NONE, ITEM_VIEW_FULL_IMAGE, 0, \r\n        getString(R.string.view_full_image)).setIcon(android.R.drawable.ic_menu_zoom);\r\n    return super.onCreateOptionsMenu(menu);\r\n}\r\n...\r\n@Override\r\npublic boolean onOptionsItemSelected(MenuItem item) {\r\n    switch (item.getItemId()) {\r\n        case ITEM_VISIT_IMDB:\r\n            visitImdbMoviePage();\r\n            return true;\r\n        case ITEM_VIEW_FULL_IMAGE:\r\n            viewFullImagePoster();\r\n            return true;\r\n    }\r\n    return false;\r\n}\r\n<\/pre>\n<p>Here is an image of what our options menu is going to look like:<\/p>\n<p><a href=\"http:\/\/4.bp.blogspot.com\/_piNjpdpJZXA\/TP0uuvDym_I\/AAAAAAAAANI\/HLB1kK21N6s\/s1600\/02-app-options-menu.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/4.bp.blogspot.com\/_piNjpdpJZXA\/TP0uuvDym_I\/AAAAAAAAANI\/HLB1kK21N6s\/s320\/02-app-options-menu.png\" style=\"cursor: pointer;height: 320px;margin: 0px auto 10px;text-align: center;width: 214px\" \/><\/a><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>The second topic of this tutorial is the creation and usage of dialogs which help interacting with the application&#8217;s users. The most straightforward way to do that is to directly use the <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Dialog.html\">Dialog<\/a> class. The <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Dialog.html#Dialog%28android.content.Context%29\">Dialog constructor<\/a> requires a <a href=\"http:\/\/developer.android.com\/reference\/android\/content\/Context.html\">Context<\/a> object as argument, and that is going to be the <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html\">Activity<\/a> within which the dialog is created. Just like as with an <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html\">Activity<\/a>, dialog objects provide a <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Dialog.html#setContentView%28int%29\">setContentView<\/a> method, which accepts a layout resource ID and sets the screen content from that layout resource. Similarly, the findViewById method allows us to find a reference of the view that was identified by the id attribute from the XML layout. The internal views can then be manipulated as usual. In two words, it is just like building a <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/View.html\">View<\/a> for an <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html\">Activity<\/a>.<\/p>\n<p>After we are done with creating the dialog, a call to the show method will start the dialog and display it on screen. In that case, the window is placed in the application layer and opaque. After we are done with the specific dialog, we have to call the <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Dialog.html#dismiss%28%29\">dismiss<\/a> method in order to remove it from the screen. Note that this method can be invoked safely from any thread. A final note on <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Dialog.html\">Dialog<\/a>s is that you can either define a title for it (via the <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Dialog.html#setTitle%28java.lang.CharSequence%29\">setTitle<\/a> method) or indicate that no title is needed for it (via the <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Dialog.html#requestWindowFeature%28int%29\">requestWindowFeature<\/a> method and the <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/Window.html#FEATURE_NO_TITLE\">FEATURE_NO_TITLE<\/a> feature).<\/p>\n<p>In our application we are going to create two different kind of dialogs: one for showing a movie&#8217;s poster image and one for presenting the movie&#8217;s overview. Let&#8217;s see the code snippets for those.<\/p>\n<p>For the poster image dialog we have:<\/p>\n<pre class=\"brush:java\">final Dialog dialog = new Dialog(this);\r\ndialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\r\ndialog.setContentView(R.layout.full_image_layout);\r\n...\r\nfinal Button closeDialogButton = (Button) dialog.findViewById(R.id.close_full_image_dialog_button);\r\nimageView = (ImageView) dialog.findViewById(R.id.image_view);                                \r\ncloseDialogButton.setOnClickListener(new OnClickListener() {            \r\n    @Override\r\n    public void onClick(View v) {\r\n        dialog.dismiss();\r\n    }\r\n});\r\nfinal ImageDownloaderTask task = new ImageDownloaderTask();\r\ntask.execute(imageUrl);\r\n        \r\ndialog.show();\r\n<\/pre>\n<p>Note that the image is retrieved asynchronously with the ImageDownloaderTask (extends the <a href=\"http:\/\/developer.android.com\/reference\/android\/os\/AsyncTask.html\">AsyncTask<\/a> class) and the <a href=\"http:\/\/developer.android.com\/reference\/android\/widget\/ImageView.html\">ImageView<\/a> is populated in the <a href=\"http:\/\/developer.android.com\/reference\/android\/os\/AsyncTask.html#onPostExecute%28Result%29\">onPostExecute<\/a> method. For that dialog, the layout XML is named \u201cfull_image_layout.xml\u201d and it is the following:<\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n\r\n&lt;LinearLayout \r\n    xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    android:orientation=\"vertical\" \r\n    android:layout_width=\"fill_parent\"\r\n    android:layout_height=\"fill_parent\"\r\n&gt;\r\n\r\n    &lt;ImageView \r\n        android:id=\"@+id\/image_view\" \r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\" \r\n        android:layout_gravity=\"center\"\r\n        android:layout_marginLeft=\"5dip\"\r\n        android:layout_marginRight=\"5dip\"\r\n        android:layout_marginTop=\"5dip\"\r\n        android:layout_marginBottom=\"5dip\"\r\n       \/&gt;\r\n       \r\n       &lt;Button \r\n        android:id=\"@+id\/close_full_image_dialog_button\" \r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\" \r\n        android:text=\"@string\/close\"\r\n        android:layout_weight=\"0.5\"\r\n        android:layout_marginLeft=\"10dip\"\r\n        android:layout_marginRight=\"10dip\"\r\n        android:layout_marginTop=\"5dip\"\r\n        android:layout_marginBottom=\"5dip\"\r\n        android:layout_gravity=\"center\" \r\n    \/&gt;        \r\n\r\n&lt;\/LinearLayout&gt;\r\n<\/pre>\n<p>When hitting the appropriate menu button, here is what you are going to get for the poster image dialog:<\/p>\n<p><a href=\"http:\/\/1.bp.blogspot.com\/_piNjpdpJZXA\/TP0v-msr43I\/AAAAAAAAANQ\/Y8MnT4wjNPY\/s1600\/03-poster-image.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/1.bp.blogspot.com\/_piNjpdpJZXA\/TP0v-msr43I\/AAAAAAAAANQ\/Y8MnT4wjNPY\/s320\/03-poster-image.png\" style=\"cursor: pointer;height: 320px;margin: 0px auto 10px;text-align: center;width: 213px\" \/><\/a><\/p>\n<p>For the movie overview dialog, we have the following:<\/p>\n<pre class=\"brush:java\">final Dialog dialog = new Dialog(this);\r\ndialog.setContentView(R.layout.movie_overview_dialog);\r\n\r\ndialog.setTitle(title);\r\n\r\nfinal TextView overviewTextView = (TextView) dialog.findViewById(R.id.movie_overview_text_view);\r\noverviewTextView.setText(overview);\r\n        \r\nfinal Button closeButton = (Button) dialog.findViewById(R.id.movie_overview_close_button);\r\n        \r\ncloseButton.setOnClickListener(new OnClickListener() {            \r\n    @Override\r\n    public void onClick(View v) {\r\n        dialog.dismiss();\r\n    }\r\n});\r\n        \r\ndialog.show();\r\n<\/pre>\n<p>Respectively, the XML layout file is named \u201cmovie_overview_dialog.xml\u201d and it is the following:<\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n\r\n&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n   android:orientation=\"vertical\"\r\n   android:layout_width=\"fill_parent\"\r\n   android:layout_height=\"fill_parent\"\r\n   &gt;\r\n   \r\n   &lt;ScrollView\r\n           android:layout_width=\"fill_parent\"\r\n           android:layout_height=\"fill_parent\"&gt;\r\n           \r\n           &lt;LinearLayout\r\n               android:orientation=\"vertical\"\r\n            android:layout_width=\"fill_parent\"\r\n            android:layout_height=\"fill_parent\"\r\n            android:paddingLeft=\"5px\"\r\n            android:paddingRight=\"5px\"\r\n            android:paddingBottom=\"10px\"\r\n           &gt;\r\n   \r\n            &lt;TextView\r\n                android:id=\"@+id\/movie_overview_text_view\"\r\n                android:layout_width=\"wrap_content\"\r\n                android:layout_height=\"wrap_content\"\r\n                android:layout_centerHorizontal=\"true\"\r\n                android:layout_marginBottom=\"5dip\"\r\n                android:layout_marginLeft=\"5dip\" \r\n                android:layout_marginRight=\"5dip\"\r\n             \/&gt;\r\n                \r\n            &lt;Button \r\n                android:id=\"@+id\/movie_overview_close_button\"\r\n                android:text=\"@string\/close\"\r\n                android:layout_width=\"wrap_content\"\r\n                android:layout_height=\"wrap_content\"\r\n            \/&gt;\r\n        \r\n        &lt;\/LinearLayout&gt;\r\n    \r\n    &lt;\/ScrollView&gt;\r\n    \r\n&lt;\/LinearLayout&gt;\r\n<\/pre>\n<p>An example of the movie overview dialog is the following (note that this dialog appears when the user clicks on one of the movies of the list):<\/p>\n<p><a href=\"http:\/\/4.bp.blogspot.com\/_piNjpdpJZXA\/TP0wKVIrOOI\/AAAAAAAAANY\/olqEqpG-jWo\/s1600\/04-moview-overview.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/4.bp.blogspot.com\/_piNjpdpJZXA\/TP0wKVIrOOI\/AAAAAAAAANY\/olqEqpG-jWo\/s320\/04-moview-overview.png\" style=\"cursor: pointer;height: 320px;margin: 0px auto 10px;text-align: center;width: 214px\" \/><\/a><\/p>\n<p>All in all, the \u201cMoviesListActivity\u201d class is now as follows:<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.android.apps.moviesearchapp;\r\n\r\nimport java.io.InputStream;\r\nimport java.util.ArrayList;\r\n\r\nimport android.app.Dialog;\r\nimport android.app.ListActivity;\r\nimport android.app.ProgressDialog;\r\nimport android.content.DialogInterface;\r\nimport android.content.Intent;\r\nimport android.content.DialogInterface.OnCancelListener;\r\nimport android.graphics.Bitmap;\r\nimport android.graphics.BitmapFactory;\r\nimport android.net.Uri;\r\nimport android.os.AsyncTask;\r\nimport android.os.Bundle;\r\nimport android.view.Menu;\r\nimport android.view.MenuItem;\r\nimport android.view.View;\r\nimport android.view.Window;\r\nimport android.view.View.OnClickListener;\r\nimport android.widget.Button;\r\nimport android.widget.ImageView;\r\nimport android.widget.ListView;\r\nimport android.widget.TextView;\r\nimport android.widget.Toast;\r\n\r\nimport com.javacodegeeks.android.apps.moviesearchapp.io.FlushedInputStream;\r\nimport com.javacodegeeks.android.apps.moviesearchapp.model.Movie;\r\nimport com.javacodegeeks.android.apps.moviesearchapp.services.HttpRetriever;\r\nimport com.javacodegeeks.android.apps.moviesearchapp.ui.MoviesAdapter;\r\nimport com.javacodegeeks.android.apps.moviesearchapp.util.Utils;\r\n\r\npublic class MoviesListActivity extends ListActivity {\r\n    \r\n    private static final String IMDB_BASE_URL = \"http:\/\/m.imdb.com\/title\/\";\r\n    \r\n    private static final int ITEM_VISIT_IMDB = 0;\r\n    private static final int ITEM_VIEW_FULL_IMAGE = 1;\r\n    \r\n    private ArrayList&lt;Movie&gt; moviesList = new ArrayList&lt;Movie&gt;();\r\n    private MoviesAdapter moviesAdapter;\r\n    \r\n    private HttpRetriever httpRetriever = new HttpRetriever();\r\n    \r\n    private ProgressDialog progressDialog;\r\n    private ImageView imageView;\r\n    \r\n    @SuppressWarnings(\"unchecked\")\r\n    @Override\r\n    public void onCreate(Bundle savedInstanceState) {\r\n        \r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.movies_layout);\r\n\r\n        moviesAdapter = new MoviesAdapter(this, R.layout.movie_data_row, moviesList);\r\n        moviesList = (ArrayList&lt;Movie&gt;) getIntent().getSerializableExtra(\"movies\");\r\n        \r\n        setListAdapter(moviesAdapter);\r\n        \r\n        if (moviesList!=null &amp;&amp; !moviesList.isEmpty()) {\r\n            \r\n            moviesAdapter.notifyDataSetChanged();\r\n            moviesAdapter.clear();\r\n            for (int i = 0; i &lt; moviesList.size(); i++) {\r\n                moviesAdapter.add(moviesList.get(i));\r\n            }\r\n        }\r\n        \r\n        moviesAdapter.notifyDataSetChanged();\r\n        \r\n    }\r\n    \r\n    @Override\r\n    public boolean onCreateOptionsMenu(Menu menu) {\r\n        menu.add(Menu.NONE, ITEM_VISIT_IMDB, 0, \r\n                getString(R.string.visit_imdb)).setIcon(android.R.drawable.ic_menu_set_as);\r\n        menu.add(Menu.NONE, ITEM_VIEW_FULL_IMAGE, 0, \r\n                getString(R.string.view_full_image)).setIcon(android.R.drawable.ic_menu_zoom);\r\n        return super.onCreateOptionsMenu(menu);\r\n    }\r\n    \r\n    @Override\r\n    public boolean onOptionsItemSelected(MenuItem item) {\r\n        switch (item.getItemId()) {\r\n            case ITEM_VISIT_IMDB:\r\n                visitImdbMoviePage();\r\n                return true;\r\n            case ITEM_VIEW_FULL_IMAGE:\r\n                viewFullImagePoster();\r\n                return true;\r\n        }\r\n        return false;\r\n    }\r\n    \r\n    @Override\r\n    protected void onListItemClick(ListView l, View v, int position, long id) {        \r\n        super.onListItemClick(l, v, position, id);\r\n        final Movie movie = moviesAdapter.getItem((int)position);\r\n        showMovieOverviewDialog(movie.name, movie.overview);        \r\n    }\r\n    \r\n    private void viewFullImagePoster() {\r\n        \r\n        final Movie movie = retrieveSelectedMovie();\r\n        \r\n        if (movie==null) {\r\n            longToast(getString(R.string.no_movie_selected));\r\n            return;\r\n        }\r\n        \r\n        String imageUrl = movie.retrieveCoverImage();\r\n        if (Utils.isMissing(imageUrl)) {\r\n            longToast(getString(R.string.no_imdb_id_found));\r\n            return;\r\n        }\r\n        \r\n        final Dialog dialog = new Dialog(this);\r\n        dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n        dialog.setContentView(R.layout.full_image_layout);\r\n        \r\n        final Button closeDialogButton = (Button) dialog.findViewById(R.id.close_full_image_dialog_button);\r\n        imageView = (ImageView) dialog.findViewById(R.id.image_view);                                \r\n        \r\n        closeDialogButton.setOnClickListener(new OnClickListener() {            \r\n            @Override\r\n            public void onClick(View v) {\r\n                dialog.dismiss();\r\n            }\r\n        });\r\n        \r\n        final ImageDownloaderTask task = new ImageDownloaderTask();\r\n        task.execute(imageUrl);\r\n        \r\n        dialog.show();\r\n        \r\n        progressDialog = ProgressDialog.show(MoviesListActivity.this,\r\n                \"Please wait...\", \"Retrieving data...\", true, true);\r\n        \r\n        progressDialog.setOnCancelListener(new OnCancelListener() {                \r\n            @Override\r\n            public void onCancel(DialogInterface dialog) {\r\n                if (task!=null) {\r\n                    task.cancel(true);\r\n                }\r\n            }\r\n        });\r\n        \r\n    }\r\n    \r\n    private void visitImdbMoviePage() {\r\n        \r\n        final Movie movie = retrieveSelectedMovie();\r\n        \r\n        if (movie==null) {\r\n            longToast(getString(R.string.no_movie_selected));\r\n            return;\r\n        }\r\n        \r\n        String imdbId = movie.imdbId;\r\n        if (Utils.isMissing(imdbId)) {\r\n            longToast(getString(R.string.no_imdb_id_found));\r\n            return;\r\n        }\r\n        \r\n        String imdbUrl = IMDB_BASE_URL + movie.imdbId;\r\n        Intent imdbIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(imdbUrl));                \r\n        startActivity(imdbIntent);\r\n        \r\n    }\r\n    \r\n    private void showMovieOverviewDialog(final String title, final String overview) {\r\n        \r\n        final Dialog dialog = new Dialog(this);\r\n        dialog.setContentView(R.layout.movie_overview_dialog);\r\n\r\n        dialog.setTitle(title);\r\n\r\n        final TextView overviewTextView = (TextView) dialog.findViewById(R.id.movie_overview_text_view);\r\n        overviewTextView.setText(overview);\r\n        \r\n        final Button closeButton = (Button) dialog.findViewById(R.id.movie_overview_close_button);\r\n        \r\n        closeButton.setOnClickListener(new OnClickListener() {            \r\n            @Override\r\n            public void onClick(View v) {\r\n                dialog.dismiss();\r\n            }\r\n        });\r\n        \r\n        dialog.show();\r\n        \r\n    }\r\n    \r\n    private class ImageDownloaderTask extends AsyncTask&lt;String, Void, Bitmap&gt; {\r\n        \r\n        @Override\r\n        protected Bitmap doInBackground(String... params) {\r\n            String url = params[0];\r\n            InputStream is = httpRetriever.retrieveStream(url);\r\n            if (is==null) {\r\n                return null;\r\n            }\r\n            return BitmapFactory.decodeStream(new FlushedInputStream(is));\r\n        }\r\n        \r\n        @Override\r\n        protected void onPostExecute(final Bitmap result) {            \r\n            runOnUiThread(new Runnable() {\r\n                @Override\r\n                public void run() {\r\n                    if (progressDialog!=null) {\r\n                        progressDialog.dismiss();\r\n                        progressDialog = null;\r\n                    }\r\n                    if (result!=null) {\r\n                        imageView.setImageBitmap(result);\r\n                    }                    \r\n                }\r\n            });\r\n        }\r\n        \r\n    }\r\n    \r\n    private Movie retrieveSelectedMovie() {\r\n        int position = getSelectedItemPosition();\r\n        if (position==-1) {\r\n            return null;\r\n        }\r\n        return moviesAdapter.getItem((int)position);\r\n    }\r\n    \r\n    private void longToast(CharSequence message) {\r\n        Toast.makeText(this, message, Toast.LENGTH_LONG).show();\r\n    }\r\n    \r\n}\r\n<\/pre>\n<p>That&#8217;s all guys. You can find <a href=\"http:\/\/dl.dropbox.com\/u\/7215751\/JavaCodeGeeks\/AndroidFullAppTutorialPart07\/AndroidMovieSearchAppProject_Part07.zip\">here<\/a> the Eclipse project created so far. Cheers!<\/p>\n<div style=\"margin: 0px\"><strong><i>Related Articles :<\/i><\/strong><\/div>\n<ul>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/10\/android-full-application-tutorial.html\">\u201cAndroid Full Application Tutorial\u201d series<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html\">Android Text-To-Speech Application<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/09\/android-reverse-geocoding-yahoo-api.html\">Android Reverse Geocoding with Yahoo API &#8211; PlaceFinder<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/09\/android-location-based-services.html\">Android Location Based Services Application \u2013 GPS location<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/06\/install-android-os-on-pc-with.html\">Install Android OS on your PC with VirtualBox<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/06\/embracing-android-awesomeness-quick.html\">Embracing the Android awesomeness: A quick overview<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This is the seventh part of the \u201cAndroid Full Application Tutorial\u201d series. The complete application aims to provide an easy way of performing movies\/actors searching over the internet. In the first part of the series (\u201cMain Activity UI\u201d), we created the Eclipse project and set up a basic interface for the main activity of the &hellip;<\/p>\n","protected":false},"author":3,"featured_media":46,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[83,29],"class_list":["post-338","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android-core","tag-android-tutorial","tag-eclipse"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Android Full App, Part 7: Using options menus and customized dialogs for user interaction - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"This is the seventh part of the \u201cAndroid Full Application Tutorial\u201d series. The complete application aims to provide an easy way of performing\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android Full App, Part 7: Using options menus and customized dialogs for user interaction - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"This is the seventh part of the \u201cAndroid Full Application Tutorial\u201d series. The complete application aims to provide an easy way of performing\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2010-12-06T20:57:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-21T19:24:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/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=\"Ilias Tsagklis\" \/>\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=\"Ilias Tsagklis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html\"},\"author\":{\"name\":\"Ilias Tsagklis\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9a83496b285d30c61e8a674625c1350e\"},\"headline\":\"Android Full App, Part 7: Using options menus and customized dialogs for user interaction\",\"datePublished\":\"2010-12-06T20:57:00+00:00\",\"dateModified\":\"2012-10-21T19:24:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html\"},\"wordCount\":1220,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/android-logo.jpg\",\"keywords\":[\"Android Tutorial\",\"Eclipse\"],\"articleSection\":[\"Android Core\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html\",\"name\":\"Android Full App, Part 7: Using options menus and customized dialogs for user interaction - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/android-logo.jpg\",\"datePublished\":\"2010-12-06T20:57:00+00:00\",\"dateModified\":\"2012-10-21T19:24:30+00:00\",\"description\":\"This is the seventh part of the \u201cAndroid Full Application Tutorial\u201d series. The complete application aims to provide an easy way of performing\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/android-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/android-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/12\\\/android-full-app-part-7-options-menus.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/android\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Android Core\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/android\\\/android-core\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Android Full App, Part 7: Using options menus and customized dialogs for user interaction\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9a83496b285d30c61e8a674625c1350e\",\"name\":\"Ilias Tsagklis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"caption\":\"Ilias Tsagklis\"},\"description\":\"Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.\",\"sameAs\":[\"http:\\\/\\\/www.iliastsagklis.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/iliastsagklis\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/ilias-tsagklis\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android Full App, Part 7: Using options menus and customized dialogs for user interaction - Java Code Geeks","description":"This is the seventh part of the \u201cAndroid Full Application Tutorial\u201d series. The complete application aims to provide an easy way of performing","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:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html","og_locale":"en_US","og_type":"article","og_title":"Android Full App, Part 7: Using options menus and customized dialogs for user interaction - Java Code Geeks","og_description":"This is the seventh part of the \u201cAndroid Full Application Tutorial\u201d series. The complete application aims to provide an easy way of performing","og_url":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2010-12-06T20:57:00+00:00","article_modified_time":"2012-10-21T19:24:30+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg","type":"image\/jpeg"}],"author":"Ilias Tsagklis","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ilias Tsagklis","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html"},"author":{"name":"Ilias Tsagklis","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9a83496b285d30c61e8a674625c1350e"},"headline":"Android Full App, Part 7: Using options menus and customized dialogs for user interaction","datePublished":"2010-12-06T20:57:00+00:00","dateModified":"2012-10-21T19:24:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html"},"wordCount":1220,"commentCount":2,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg","keywords":["Android Tutorial","Eclipse"],"articleSection":["Android Core"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html","url":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html","name":"Android Full App, Part 7: Using options menus and customized dialogs for user interaction - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg","datePublished":"2010-12-06T20:57:00+00:00","dateModified":"2012-10-21T19:24:30+00:00","description":"This is the seventh part of the \u201cAndroid Full Application Tutorial\u201d series. The complete application aims to provide an easy way of performing","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2010\/12\/android-full-app-part-7-options-menus.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Android","item":"https:\/\/www.javacodegeeks.com\/category\/android"},{"@type":"ListItem","position":3,"name":"Android Core","item":"https:\/\/www.javacodegeeks.com\/category\/android\/android-core"},{"@type":"ListItem","position":4,"name":"Android Full App, Part 7: Using options menus and customized dialogs for user interaction"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9a83496b285d30c61e8a674625c1350e","name":"Ilias Tsagklis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","caption":"Ilias Tsagklis"},"description":"Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.","sameAs":["http:\/\/www.iliastsagklis.com\/","https:\/\/www.linkedin.com\/in\/iliastsagklis"],"url":"https:\/\/www.javacodegeeks.com\/author\/ilias-tsagklis"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=338"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/338\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/46"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}