Introduction
Ninety percent of people use Android smartphones. I will show you how to create an addition application for Android using Android studio. Android is a kernel based operating system. It allows the user to modify the GUI components and source code.
Requirements
- Android studio
- Little bit of XML and JAVA Knowledge.
Download link (android studio) https://developer.android.com/studio/
Steps should be followed
Carefully follow my steps on how to create the addition application for android using android studio and I have included the source code below.
Step 1
Open Android studio start the new project.
Step 2
Put the application name and company domain. If you wish to use c++ for code the project, Include c++ support then click next.
Step 3
Select the android minimum SDK. After you chose the minimum SDK it will show approximate percentage of people who use that sdk then click next.
Step 4
Choose the basic activity then click next
Step 5
Put the activity name and layout name. Android studio basically takes the java class name from what you provide as the activity name.
Step 6
Goto activity_layout.xml then click the text bottom. Into the activity_layout.xml copy and paste the below code.
activity_layout.xml code
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/relativeLayout1"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
- <LinearLayout
- android:id="@+id/linearLayout1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true" >
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:text="ADDITION"
- android:textSize="20dp" >
- </TextView>
- </LinearLayout>
- <LinearLayout
- android:id="@+id/linearLayout2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/linearLayout1" >
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="ENTER NO 1" >
- </TextView>
- <EditText
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0.20"
- android:id="@+id/edittext1"
- android:inputType="number">
- </EditText>
- </LinearLayout>
- <LinearLayout
- android:id="@+id/linearLayout3"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/linearLayout2" >
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="ENTER NO 2" >
- </TextView>
- <EditText
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0.20"
- android:id="@+id/edittext2"
- android:inputType="number">
- </EditText>
- </LinearLayout>
- <LinearLayout
- android:id="@+id/linearLayout4"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/linearLayout3" >
- <Button
- android:layout_width="wrap_content"
- android:id="@+id/button1"
- android:layout_height="wrap_content"
- android:text="Addition"
- android:layout_weight="0.50" />
- <Button
- android:layout_width="wrap_content"
- android:id="@+id/button3"
- android:layout_height="wrap_content"
- android:text="subtraction"
- android:layout_weight="0.50" />
- <Button
- android:layout_width="wrap_content"
- android:id="@+id/button2"
- android:layout_height="wrap_content"
- android:text="CLEAR"
- android:layout_weight="0.50" />
- </LinearLayout>
- <View
- android:layout_height="2px"
- android:layout_width="fill_parent"
- android:layout_below="@+id/linearLayout4"
- android:background="#DDFFDD"/>
- </RelativeLayout>




Ganeshan NPosted Apr 8, 2017, 12:51 AM
Thanks ....i will do in my best
Vidyadharran GPosted Apr 7, 2017, 12:32 PM
It's cool keep posted..............................
Akshayrao VPosted Apr 6, 2017, 2:19 PM
Super keep it up Good