Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to build your own Android App – Step by Step Guide

Sponsored Links

This tutorial will briefly explain about the installation to development and running your Android application. It also includes step by step guide for creating user interface design for your application. There are a bunch of android development courses available over internet offering you the complete reference to android development and its inbuilt features. These courses are designed by android experts guiding you to emerge as an professional in application development.

Environmental Setup:

You can start building your Android application on any platform. It can be:

1). Windows OS
2). Mac OS
3). Linux including GNU C library

Setup Java development kit:

The latest version for java IDE can be downloaded from Oracle’s java website. You’ll find step by step instruction for installation on your device.

Android IDE setup:

There are numerous technologies available for developing android application. You can install any one of them:

1). Android Studio
2). Eclipse IDE

We can develop our first android application in any of these platforms, but for feasibility we are selecting Android Studio this time.

Development:

1). After installation of Android Studio, firstly click on the Start a new Android Studio Project on welcome page.
2). Now a window for creating new project will appear which contains two fields one is application name and second one will be company domain. In both the fields enter the following value:

Application Name: “First App”
Company Domain: “xyz.com”

Here you can also change the location for your project.

Sponsored Links

3). The android app can be written in Java or Kotlin. Depending upon your need and best practices you can mark checkbox for including Kotlin. Then click next.
4). Now you’ll have option for selecting Target Devices screen which for now keep default and click next.
5). Then for adding an Activity to mobile screen will appear which should be selected as Empty Activity and click next to continue to your next step for building android application.
6). Now a window will appear asking for Configuring Activity Screen which you’ll keep default and then click Finish button. Wait for few seconds and IDE will get opened.

Now a project window will be open on your screen. It will contain a bundle of files and directories. These files can be:

a). app/java/com.xyz.firstapp/MainActivity

It is the entry point for the application. Whenever a app is build and execute then the system generate an instance of Activity and load its layout.

b). app/res/layout/activity_main.xml

It is the XML file which defines the activity’s UI. It contains fields like layout_width, layout_height, TextView element with string text hello as:

android :text=”@string/hello” />

c). app/manifests/AndroidManifest.xml

This file defines all the components and their characteristics in the application. It is the root of the project set. It defines app’s package name, components of app, permissions needed in the app, software and hardware feature required for app.

d). Gradle Scripts/build.gradle
Each module contains its own build.gradle file which helps to configure the gradle tools compilation and building for your application.

Running You App:
You can execute your app either on emulator or android based real device. For running it on emulator follow these steps:

1). Click on app module in the project window and click Run.
2). Now for select deployment target window and create new virtual device.
3). Then select hardware screen, phone device and click on next button.
4). A System Image screen will appear, here you have to select the highest API level. If the selected version will not be installed on your system then click on the download link and then click next after downloading.
5). An Android Virtual Device screen will appear, here you don’t have to make any changes just click Finish.
6). Select the created device for select deployment target and click ok.
Hola..!! Android studio will start the app and shows ‘hello’ in simulator.

User Interface Design:

To create layout including buttons and text box you can use Layout Editor of android studio.

1). Open app/res/layout/activity_main.xml file from project.
2). Click on the design tab located in bottom of the window.
3). Select Blueprint in design surface selection window.
4). Mark check show constraints by clicking show in layout editor then turn off the Autoconnect.
5). Select default margins in toolbar and adjust it. For now we are selecting it as 16. It defines margine view for each view.
6). Now click on the device in editor in toolbar and select screen size in pixels.
7). Now you can add button, textbox and other cool features for designing your app.
8). For adding textbox click TextView in component tree window and delete it.
9). Click Text in Palette for getting available text controls.
10). Drag text in design editor.
11). Click on the view for resizing handles on each corner.
12). Similarly, for designing buttons click Widgets in Palette.
13). Drag button in editor and create constraints from left and right side of text box.
14). Click on the Edit baseline for constraint view in alignment.
15). Now open app/res/values/string.xml. For specifying all your UI strings and managing them from a single location.
16). Open translation editor for adding or editing strings and then click on add key to create a new string for the text box and add key as keyname and value.
17). Click ok and define other button for sending.
Now simply update new changes and execute the app again. You are good to go for designing your own creative app in Android Studio.

Sponsored Links

The post How to build your own Android App – Step by Step Guide appeared first on Droidsavvy.



This post first appeared on Best Solution For Android Tips & Tricks, please read the originial post: here

Share the post

How to build your own Android App – Step by Step Guide

×

Subscribe to Best Solution For Android Tips & Tricks

Get updates delivered right to your inbox!

Thank you for your subscription

×