Android :Learn to make your own Android App

Android applications are in great demand in the market ,and that how it attarcts more freaky programmers to develop apps for Android. Today ,I am going to demonstrate how to display any text in the Android App .

If you are newbie to Java,then this is not the right place for you,just brush up Java before you start here.At first you need to install Android SDK as per your system.For installation help click here

STEP 1: Start Eclipse.Once it is started.Go to File

File->New->Android Application Project.


A dialog box will appear ,name is whatever you wish like i have given it name as Android_1
If you are asked to select a build target,and if you have installed Android API,choose API level as shown in the picture below.
android 4
Once selected click Next.
NOTE: The name of the package should be unique as once you will upload this app to Google Android marketplace.You Android App will be recognized with unique package name.

STEP 2: Now we need to create an activity.Activity is basically the layout structure that we want to display in our App.
Select Blank Activity on clicking next after Step 1.
Give the name of the Activity as I have given the name of the activity as Android_test
and click Finish
a6-03-15 12:03:36

FInally go to Window->AVD Manager and start your target emulator( An emulator is a virtual Android device to run Android Apps ).

STEP 3: Go to ECLIPSE  and see the Project Explorer ,and you will see all the files  listed in your project like the following image.


Now open AndroidManifest.xml and you will find the codes as

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
    android:versionName="1.0" >

        android:targetSdkVersion="17" />

        android:theme="@style/AppTheme" >
            android:label="@string/app_name" >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />

        <activity android:name=".Second_activity" android:label="@string/app_name"/>



Brief Explanation about AndroidManifest.xml:-

AndroidManifest.xml file contains app specific settings such as app version and minimum SDK version.The different permissions required,activities that can be run,services,broadcast receives and more.
Once open,it will open in default graphical view,change it into AndroidManifest.xml view at the bottom right of your view of the manifest .
At the top level under application you are specifying icons and label.The main function of intent filter stuff is that it specifies what should launch when an App runs.

And again go to project Explorer and search for “res” folder and res->values>string.xml and the string.xml will open like shown below .

<?xml version="1.0" encoding="utf-8"?>

    <string name="app_name">android_1</string>
    <string name="hello_world">Hello world! THIS IS MY ANDROID TUTORIAL</string>
    <string name="menu_settings">Settings</string>
     <string name="test_one"> THIS IS MY FIRST ANDROID PROGRAM</string>
     <string name="click_me">Click Me</string>


you will see that two strings are already created.If you look at the AndroidManifest.xml file ,you will find
@String/app_name.It is referring to the app_name string seen here.This string.xml is basically a resource file.These are heavily used in Android to make it easier to localize your application.
Again move on to res/layout/activity_android_test.xml.You will see a file a like this

<RelativeLayout xmlns:android=""
    tools:context=".Android_test" >

        android:id="@+id/lblTextViewOne" />

        android:text="CLICK ME" />

Relative Layout is the way of containing and organizing element inside of it.The Relative Layout is used to display a block of text.

STEP 3: Now go to src->com.Example.Android_1
and open the file once there.And write the code as given given:

package com.example.android_1;

import android.os.Bundle;
import android.content.Intent;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class Android_test extends Activity {

	protected void onCreate(Bundle savedInstanceState) {

		final TextView TextViewOne = (TextView) findViewById(;



Explantation of
Android_test class is extending the Activity class (which is part of Android SDK).We are only overriding one method from the Activity subclass,the “onCreate” method .This method is called when the activity is created and also when the screen is rotated.We call super.onCreate method so that the Activity subclass can handle its plumbing and then we call setContentView .This method is passed R.Layout.main .R is a way to refer to res folder and is how we pro-grammatically access the items in that folder.

All we need to do is to create a new string and then use your TextView to use that String in the onCreate method.
let’s add an string to string.xml

<stringname="test_one">This is my first App</string>

Screenshot from 2013-03-15 12:25:29
then go back to activity_android_test.xml/main.xml

and add an id to it like


again go to and write the following code

 TextView newtext=(TextView)findViewById(

if there is an error coming just import “TextView” or (android.widget)
again set the property of the Textview as


Now your app is ready is ready to run.Just clean and build and RUN AS ANDROID APPLICATION
You will see an updated text.

Joomla Tutorials!! Convert HTML Template to Joomla Template

STEP 1. Prepare your template.The template must be HTML & CSS compliant.There are so many HTML Template on the Internet.Download it rename the index.HTML to index.php .Joomla will search for index.php in the template directory.


STEP 2. Replace the HTML code before the body tag of your file(index.php) with this code:

&lt;!--?php //no direct access  defined('_JEXEC')or die('Restricted access'); ?--&gt;
&lt;! Doctype html Public&quot;_ 1.dtd&quot;&gt;
&lt;head&gt;&lt;jdoc:include type=&quot;head&quot;/&gt;
&lt;link rel=&quot;stylesheet href=&quot; /&gt;baseurl?&gt;/template/system/css/system.css&quot; type=&quot;text/css&quot;/&gt;&lt;/head&gt;

all we need to do is to make minor changes in the code shown below

&lt;link rel=&quot;stylesheet href=&quot; /&gt;baseurl?&gt;/template/your_template_name/your_css_directory/your_css_filename.css&quot; type=&quot;text/css&quot;/&gt;

STEP 3. Now we have place various module positions inside your(index.php) file

&lt;jdoc:include type=&quot;modules&quot; name=&quot;your_module_position_name&quot;/&gt;

to appropriate position.The name attribute is the module position name snippet code is given below:-
Suppose there is a module known as logo .just make changes like this

&lt;div id=&quot;logo&quot;&gt;&lt;/div&gt;
&lt;jdoc:include type=&quot;modules&quot; name=&quot;top&quot;/&gt;&lt;/div&gt;

After that, you need to place a component. The code is shown below.

&lt;jdoc:include type=&quot;component&quot; /&gt;

4.Now we will create a manifest file.We need to create a manifest file to list all files we used.
If we don’t create it, it will cause error while installing our template. Here is the sample of a manifest file:

&lt;pre lang=&quot;enc__xml&quot;&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!DOCTYPE install PUBLIC &quot;-//Joomla! 1.5//DTD template 1.0//EN&quot; &quot;;&gt;
&lt;install version=&quot;1.5&quot; type=&quot;template&quot;&gt;
&lt;author&gt;NEERAJ GOSWAMI&lt;/author&gt;
&lt;description&gt;template description goes here&lt;/description&gt;

STEP 5: Nothing to do now.just zip it and install it.