Featured post

Displaying Multiple Fragments in a single Activity

Thursday, 15 October 2015

Developing and Running the Android Application

Demo 1:

In order to design and develop android applications, you require two things: XML file and Java File.

Let's start with the Application.

First Go to the File Tab and create a new Android Project. Enter the Application name as Demo 1 and then click Next for 4 times followed by finish option. Sooner IDE will provide you activity_main.xml and MainActivity.java file.

Clear the content of the activity_main.xml file because I am goanna teach you how to design the UI from scratch.

 Start Writing:
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="10dp">
   
    <EditText
        android:id="@+id/editText1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:hint="Enter Your Name"/>
   
    <Button
        android:id="@+id/button1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Submit"/>
   
    <TextView
        android:id="@+id/textView1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Your Name is"
        android:textSize="30sp"
        />
   
</LinearLayout>

In order to complete this Demo, read the next blog with title Developing and Running the Android Application(contd...)

No comments:

Post a Comment