How to Create Android Apps in 5 Simple Steps!

 

Drawing Brush Application for Android
So, you’ve heard that Android Development skills would help broaden your job prospects, and are wondering where to begin. Here is a step-wise guide to help you create Android apps (basic Drawing Brush Application) using Eclipse IDE.

Watch the following video to get a preview of the Drawing Brush application created in the tutorial:

       1. Understand what you want to create!

        This application is similar to Paint tool in windows, excluding the more advanced features. Here’s how it works:

  • Draw anything on the screen just by touching.
  • Clear your screen by pressing the “Clear Screen” button.
Seems simple enough, right! Let’s begin.

      2) Get the Android development tools!


           What do I need to create Android apps?

1) Basic knowledge of Java

   
2) Eclipse IDE (Thanks to Eclipse IDE, creating Android apps is not quite the drag it could have been. It saves the developers a lot of time).

      3) Understand the Application Structure!
  
       Alright, now that we have seen the UI of the app, let’s move on to see what goes on behind the scenes.



      Paint Class
We used the Paint class that holds the style and color information about how to draw geometries, text and bitmaps.

Paint object
   
    The Paint object represents the “brush” here.
 
               OnTouch Events

    A very important input method for Android devices. Touch events offer the ability to interpret finger activity on touchscreens.

          MotionEvent
t is used to report movement, and is thus the base class for Touch Events.
       
           getX() and getY()

Used to get the current position.

onDraw()

    You get a Canvas object which allows you to perform drawing operations on it, e.g. draw lines, circle, text and Bitmaps.

           4) To create Android apps, know the code that makes them work!

   Finally the time to get those hands dirty!
     

          5) Understand the actions that you’ll use to create Android apps:
How do I run this Application?
   
    Step 2: Extract it using WinRAR or a similar tool.

Step 3.    : If you have an Android phone, simply install the .apk file which you can find in DrawingBrush_Circle_ClearScreenButtonin DrawingBrush_Circle_ClearScreenButton.apk

Step 4: To import it to Eclipse, just copy the folder into your Eclipse workspace.

1) Select File -> Import

2) Expand the general folder.

3) Select Existing Project into work space

4) Hit next and browse your work space where it asks for “select root directory”.

5) Click Finish.

All set, you can can run it in your emulator now.



Comments

Post a Comment

Popular posts from this blog

Ethical Hacking Career: A Career Guideline For Ethical Hacker

What is hacker ? And types of hacker

6 things you should not do for IIT JEE Preparation

What is IIT ? And what is the history of IIT?

Short article about Technology