Archive for the ‘Android’ Category

In this tutorial, we’ll create a simple android application that show a list of popular android apps complete with their icons, total downloads and ratings data. Note, all the apps data we use in this tutorial is sample data. We use android List View to show list of apps. The data for the list view is fetched from MySQL Server in JSON(Javascript Object Notation) format. We use PHP as server   Read More ...

Android PHP

Async Task is an android helper class that will allows you to run a background processes. If you are a Java programmer, may be you are familiar with thread. If you run a long task in the main thread, the current user interface will be blocked untill the task has finished. This is not a good practice. To avoid the user interface is being blocked, the long task must be   Read More ...

Android

List View is an element that displays a collection of items in single column direction. It has an internal vertical scroll bar that enable user to scroll if it’s height bigger than display height. The type of single item in the list is any of java object. ListView needs an adapter to works. This adapter behaves as a data resources for the list. The adapter also defines how each items   Read More ...

Android

Gravity is an android method for aligning view in a layout. There are two kinds of gravity, gravity and layout gravity. Basically a gravity is set in xml layout files, but you can also set a gravity of any view in java source code. To set gravity in xml use android:layout_gravity and android:gravity attributes. The values of both attributes is combination of the following constants: top : Push object to   Read More ...

Android

Relative Layout is an android view group to align all childrens relative to other view or its parent. Relative layout give you flexibiliy to place childs wherever you want. In the previous example, I have give some basic example of Relative Layout. Now, I will give you how to create a more complex relative layout example. Our goal is to create layout like this: See the following step by step   Read More ...

Android

Linear Layout is an android View Group that aligns all children in single oriented manner, vertically or horizontally. A Linear layout can have only one orientation, only vertical or only horizontal. The orientation can be specified by using attribute android:orientation. Horizontal Orientation By default, if you don’t specify the attribute android:orientation, the orientation of linear layout will be horizontal. But you can put android:orientation="horizontal" to set horizontal orientation. For example:   Read More ...

Android

RelativeLayout is one of android container or ViewGroup. Like it’s name, the main feature of Relativelayout is to place one View relative to other View or with it’s parent it’s self. Place a view relative to other view In order to make a relative position of one view to another view, an id is must be defined in referred view. Says you have two TextView in layout, you want second   Read More ...

Android

Give an ID to your view object is very useful if you want to refer to that view later in source code. For example you want to set text of a TextView in source code. To do that, put android:id attibute to your view. In above code, you can see I have put an android:id="@+id/textView1". This line defines an id of our TextView to textView1. Refers view from activity After   Read More ...

Android

This tutorial will guide you to create a simple hello word application in android. Through this tutorial you will learn about the basic understanding of android activity and layout. Most common tool to create android application is Eclipse ADT plugin. You can follow step by step how to install eclipse ADT Plugin in the official developer site here. After your eclipse ADT plugin was installed, now you’re ready to create   Read More ...

Android