top of page

Learn Android App Dev: Basic Overview

Hey Guys! This is Amey Lokhande. In this post I will be telling you about some simple and basic things an individual must know to develop an Android App.

I have listed them below:

1. Finding various widgets, text fields, layouts, containers, images and media, etc.:

You can find them when you click on the activity_main.xml. We can simply drag and drop various widgets,text fields and start designing the layout of your Android App.

2. How to write text in your app and use various formatting options on the text.

Well, it is a quite easy task. All you need is to drag the TextView box from the widgets. Then edit it by simply double-clicking on it. Now you can also format the text which you have written.

You can change the font style, font color, size from the properties.

3. Now I will explain you the java code in the main_activity.java which already comes when you start a new project :

This code is responsible for the main actions of your App. For ex, if you have a button in your Android App, then the java code will decide which action it has to perform by clicking the button.

package com.example.ameylokhande.secondapp;

import android.support.v7.app.AppCompatActivity;

import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);

}

}

Now the android studio imports some files which it requires to make the app work. Then MainActivity inherits the AppCompatActivity. Well, as I told you, without the basic knowledge of Java one cannot simply develop Android App. So here inherits means we can use the variables and functions of the AppCompatActivity in our MainAcitvity.

We get a pre-created method named as onCreate which Android Studio provides us to successfully launch our App for the first time.

4. There is also some interesting thing called as Android Manifest in the manifests section.

When we open this file we can some code. This code contains the information of the activity(s). When we have multiple activities in our App then we have to mention them here in the Android Manifest file.

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

<manifest

xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.ameylokhande.secondapp">

<application

android:allowBackup="true"

android:icon="@mipmap/ic_launcher"

android:label="@string/app_name"

android:supportsRtl="true"

android:theme="@style/AppTheme">

<activity android:name=".MainActivity">

<intent-filter>

<action android:name="android.intent.action.MAIN" />

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

</intent-filter> </activity> </application>

</manifest>

Here the category android:name decides which activity is going to launch for the first time when you launch your app. Also you can change the name of your Activity here.

This is it Guys! These were some basic things one must know to develop an Android App. In the next post I'll be talking about the lifecycle of an Android Activity which is a simple and basic concept.

Thanks!

bottom of page