The basic overview of an Android Application

Here, we will be learning in detail about what an android application is and going forward and learning about it and how it works in real time. Android application is not complex. It is similar to the construction of a website. Website is the conglomeration of number of web pages. A website can have many pages and that are linked with each other. We reached to a website basically through search engines and from its home page we do find number of links to different pages of website.

Basic explanation of what an android activities are and how we use it:

In Android App we can find similar to a webpage. In the face of android app we do have ‘activities’. Which is nothing but the elements which we do see while browsing app. If there is button in the front end of app and while touching that button we reach at the next page of app then that button is also called as ‘activity’. Similarly, when we reach at the homepage of website and then click the ‘category’ or any other tab then we reach to another page and this is similar to reaching out to another page of app which is called as ‘’activity”.

Classification of android app activities:

Like in a website we can create as much links to pages as much we want similarly, with an android app we can create as much activities as we want. An activity is simply calling the instances of app which we see while browsing it. Activities of android app consist of two parts.

The first part is design part. In the case of design of app, it consists of various buttons such as text view, button, toggle button, checkbox, radio button, status bar, progress bar, seek bar, rating bar switch, space, plain text, password, e-mail , phone. The initial part is an activity that appears initially to users. Basically, the design of an activity consists of user interface of app. This defines how the application presented to the user is basically the design of an activity.

The second part of activity is the logic of an activity. This is basically the code of an activity which provides the artificial intelligence to elements of designs of activities. In order to reach towards the logic of activity we have to move to app explorer and then click on app and then on java and then on click on the name of app for example ‘com.mohanmekap.myapplication’ and then click on the arrow to reach to “MainActivity.java”. Now we have reached to the main brain of design activity and from here with the addition of codes we can provide artificial intelligence to various design buttons in the front end of app.

 

Here, you can find various code logics which stay with activities and provide directions to it while it loads inside android. The design of activity is the front end of activity. The front end of any activities is related with the presentations to end users and how they deal with app. In the back end we have logics or codes which basically instructs activity on the front end to go in the particular way. The back end or logic part also closely and carefully looks into the series of data that has been put into by users through front end and it processes and manages these data and keep in sequence to make it mostly the signs of presentations of some sort of artificial intelligence.

First design inside Main Activity:

The interface of main activity is the graphical user interface where we find the app. First we will delete what ever inside of Main activity in design part. Click on any activity and then right click on it and then click on delete to delete any activity inside main activity. After deleting all the existing activity ours graphical user interface of app or design side of main activity becomes completely blank. Now from the palette window we can add any palette or design by simply click it and then drag and drop it.

Let we want to add a text design into design activity of main window. Then, go to text and then select plain text and then simply drag and drop that plain text into it. Now, we have added a plain text into design activity of main window of android app inside android studio. Design activity allows you to add activities visually and while adding it shows you some grid lines which are measurements of app and you can out the element from palette in the whatever location you do like without any difficulties.

How to change the text inside design element?

While drag and dropping the activities you can place it in the location whichever you want to and let us place it at the middle and put it there. Then leave the left cursor of mouse and then you could see the text area out there. Now we find that after adding plain text from palette the default written inside plain text is ‘name’ and we want to change that text inside plain text.
Click on the name of the design element and here the design element in main activity and select. In earlier version of Android Studio the property of activity is known as component tree where as in the latest version of Android Studio it is known as property and it is activated on the right hand side of main activity window.

 

In the ID segment you could find the name of text element. Then, there are other characteristics of properties of design of text element such as layout_width, layout_height, input type, hint, style, single line, selection and then inside TextView of property of text is there and you could see ‘Name’ is written there and select that box and write whatever you want there. Suppose we want to change the name of Name’ and write down ‘MyApplication’. Then click on outside to see that inside of text design element in main activity area instead of ‘Name’ we find it as ‘MyApplication’.

Now we have added the text element and then rename it as ‘MyApplication’. We have done this through design element inside main activity. Now, we can do it in two ways. We can use the logic element inside mainactivity.java and write the same code and then it can be done that way. It is upto user to choose which part of activity such as design or logic part to choose. The design part is easier as it is drag and drop element. The logic part is for geeks who want to comprehensively understands the how the logic of coding in relation with design element works and it is completely yours choice to choose which part.

This entry was posted in Android Studio on by .

Modified: 15th Oct 2017

About Mohan Manohar Mekap

Mohan Manohar is a blogger from India who founded Ittech back in 2007. He is passionate about all things tech and knows the Internet and computers like the back of his hand.