Lab 1 MAD GUI Fonts and Colors
Lab 1 MAD GUI Fonts and Colors
Aim:
To develop a Simple Android Application that uses GUI components, Font and Colors.
Procedure:
Creating a New project:
Open Android Studio and then click on File -> New -> New project.
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="30dp"
android:gravity="center"
android:text="Hello World!"
android:textSize="25sp"
android:textStyle="bold" />
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:gravity="center"
android:text="Change font size"
android:textSize="25sp" />
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:gravity="center"
android:text="Change color"
android:textSize="25sp" />
</LinearLayout>
Now click on Design and your application will look as given below.
So now the designing part is completed.
Then delete the code which is there and type the code as given below.
package com.example.exno1;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
Output:
Thus a Simple Android Application that uses GUI components, Font and Colors is developed
and executed successfully.
Execute the above exercise of font size and color in Android studio and show the exact GUI
output? [2]
TASK 1.1
In the above example, Change the font styles of the text “Hello World!” by adding another
button?
Develop an android application to display current date and time on the Button widget. [6]
https://www.codingconnect.net/mobile-application-development-
lab/ https://www.javatpoint.com/android-tutorial
https://www.tutorialspoint.com/android
https://developer.android.com/guide
Https://developer.Android.com/training/basics/firstapp/creating-
project
Https://www.raywenderlich.com/120177/beginning-Android-development-
tutorial- installingAndroid-studio https://www.youtube.com/playlist?
list=PLS1QulWo1RIbb1cYyzZpLFCKvdYV_yJ-E
Https://www.udemy.com/java-tutorial/
Https://
www.w3schools.com/xml/
Http://www.Androidguys.co
m/