In this example we are going to see how to use Android Handler. As we read from the official documentation: a Handler allows you to send and process Message and Runnable objects associated with a thread’s MessageQueue. Each Handler instance is associated with a single thread and that thread’s message queue. When you create a new Handler, it is bound to the thread / ...
Read More »Home » Archives for Nikos Maravitsas »
Android HorizontalScrollView Example
In this example we are going to see how to use HorizontalScrollView in an Android Application. The HorizontalScrollView is like a ScrollView but with horizontal orientation. It is very useful because it is not very usefull to scoll up and down the whole screen of you application. You can use a small portions of the screen as HorizontalScrollView with scrolling ...
Read More »Android OnClickListener Example
In this post, we feature a comprehensive Android OnClickListener Example. We are going to see how to work with OnClickListener in an Android Application. You may use OnClickListener when you want your compoments to react when users click on them. Most (if not all) of the GUI Android components can be bundled with an OnClickListener, so you can see that ...
Read More »Android Scrollview Example
In this example we are going to see how to use Android ScrollView component. This is a layout container that can host multiple component and views and can is scrollable. For this tutorial, we will use the following tools in a Windows 64-bit platform: JDK 1.7 Eclipse 4.2 Juno Android SDK 4.2 1. Create a new Android Project Open Eclipse ...
Read More »Android Asynctask Example
In this tutorial we are going to see how to use Android AsyncTask. As we read from the Android Documentation : AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers. AsyncTask is designed to be a helper class ...
Read More »Android MultiTouch ListView Example
In this example we are going to see how to create MutliTouch ListView in an Android Application. In this example, every Item in the list is clickable, so you can bundle it with a ClickListener, and it contains two buttons to edit and delete items. For this tutorial, we will use the following tools in a Windows 64-bit platform: JDK ...
Read More »Android Service Example
In this example we are going to learn about Android Service. The Android Service is one of the most important components and building blocks in an Android System. One obvious characteristic of the Service component is that it offers no UI. It’s simply a program that runs on the background as log as it is required. It is important to ...
Read More »Android Timer Example
In this example we are going to create a simple Android Timer application. We are going to use some very basic ideas and tools, like Handler, that you can use in many cases in your Applications. We will use the Handler for the interesting part of this example, which is the timer value update. For this tutorial, we will use ...
Read More »Validate Image File Extension with Java Regular Expression example
In this tutorial we are going to see how to validate image file format with Java Regular Expressions. This is vary userful for example when you create an image uploader and you want to make sure that the user does not upload an illegal file to your system. Of cource this is one of many countermesures you should consider. The ...
Read More »Extract HTML Links with Java Regular Expression example
With this example we shall show you how to extract and process HTML links with Java Regular expression. You can follow the basic techniques in this article and learn how to process many other HTML elements and thus create a very basic HTML parser that you can easily embed in your application. So the things we want to do is: ...
Read More »