Home » Android

Android

Android Camera Example

In our previous Android Example, we tried to explain the use of Android SurfaceView through a simple camera application. In the meantime, we realized how important is the “camera mode” in a simple and modern Android application, as nowadays it is becoming very common, that the camera is used not only to capture basic portraits and landscape views, but also ...

Read More »

Android SurfaceView Example

In Android, all simple layout views are all drawn on the same GUI thread which is also used for all user interaction. So if we need to update GUI rapidly or if the rendering takes too much time and affects user experience then we should use SurfaceView. The Android SurfaceView provides a dedicated drawing surface embedded inside of a view ...

Read More »

Android Cursor Example

In Android programming, storing data into a database is not a common practice, as we have other and most suitable methods to store our data, such as the SharedPreferences way. However, we do have a very strong tool, that can help our Android Application communicate with a database, and this is SQLite. SQLite is an Open Source Database for structured ...

Read More »

Android Bundle Example

As we have seen in our previous example Android StartActivityForResult Example, in Android, the Intent describes the activity to be executed. An Intent contains certain header, action and type, but also can contain data. The data of the Intent is described as a Bundle. The Bundle object is used to pass data between activities. This data can be retrieved from ...

Read More »

Android startActivityForResult Example

In Android, the startActivity(Intent) method is used to start a new activity, which will be placed at the top of the activity stack. It takes a single argument, an Intent, which describes the activity to be executed. However, sometimes we might want to get a result back from an activity when it ends. For example, you may start an activity ...

Read More »

Android TimerTask Example

In this example, we are going to see, how a java.util method, can help us deal with timer recurring tasks that are scheduled with either a fixed period or a fixed rate on Android. We will use the abstract class TimerTask. With the default fixed-period execution, each successive run of a task is scheduled relative to the start time of ...

Read More »

Android Calendarview Example

When we want to create an Android application that has an Android Activity inside of which we are planning to use a calendar, or if we want to make a simple calendar like application, we should consider in the first place Android Calendarview class. This class is a calendar widget for displaying and selecting dates. The range of dates supported ...

Read More »

Android ListActivity Example

ListActivity is a subclass of Activity that includes a ListView object. Through ListActivity class you can create an activity in your Android application that can be connected to different data sources (query cursor or arrays) and can be displayed as a set of list items on the screen. Actually, the use of the ListActivity class provides us a more simplified ...

Read More »

Android ViewFlipper Example

ViewFlipper is an extension class of ViewAnimator, which animates between two or more views that have been added to it. Specfically, only one child is shown at a time. To get a better understanding, suppose that we have two TextViews that will be used in our app, but we want only one to be displayed at a time. That is, ...

Read More »

Android Menu Example

Today we ‘re gonna see how to create a Menu with icon items, which on click, fire a respective to them message. What differentiates this article from other similars, is that we ‘re using the latest Android APIs, where Menus are manipulated differently. Having created an Android project, using the latest platform, gives us by default a menu layout, as ...

Read More »