Page |1
INFORMATION TECHNOLOGY AND INFORMATION SYSTEM
DEPARTMENT
MOBILE DEVELOPMENT
EXERCISE
2
WELCOME MESSAGE
Marcos, Jeremy M. BSIT 304
09/092020 09/092020
GJPRosales
Page |2
I. OBJECTIVES
At the end of this exercise, students must be able to:
a) Create an Android project.
b) Manage the directory structure for design and control codes.
c) Apply values referencing in string.xml file.
d) Compile, run and debug the program.
II. BACKGROUND INFORMATION
In order to accomplish this exercise, the student must have a clear understanding of
the following topics:
• Android SDK
• Android Studio IDE
• xml structure
• Android project directory structure
• Android virtual device setup
• String value reference
III. EXPERIMENTAL PROCEDURE
TASK 1: Renaming Application Name
1. Under the project window located in the left side of your screen. Open strings.xml
under res/values/ folder location
2. Open the strings.xml in code view and add the statement provided below.
app_name = BLOCK – SURNAME
GJPRosales
Page |3
3. Open activity_main.xml from res/layout folder. (select the Graphical Layout)
4. From the Palette Pane, select Text, drag the TextView in view layout. Change
the textSize to 30sp (Scale-independent Pixels) under the attributes pane
5. To modify the content of our text view, we have two options:
GJPRosales
Page |4
a. using the attributes and modifying text attribute to @string/message. A
while ago we have modified the strings.xml with <string name=
“message”> Welcome to Android Development! </string>. To make the
strings center, select gravity then center
b. Using the code view of our activity_main.xml
6. Run your application and confirm if your app name will appear and welcome to
android development.
GJPRosales
Page |5
TASK 2. OUTPUT: MODIFY THE APPLICATION AND RUN
1. Do the procedure 2 to 6 by adding your student name, student number and
program. You may play with the layout attributes to avoid overlapping of your
strings. Provide the screenshot of the output before the question and answer.
EXAMPLE OUTPUT:
II. QUESTION AND ANSWER
GJPRosales
Page |6
1. Differentiate different unit of measurement used in android studio. Include the
description, units per physical inch, density independence of px, pt, dp and sp
px: our usual standard pixel which maps to the screen pixel.
pt: 1/72 of an inch, with respect to the physical screen size.
dp: Density Independent Pixel, it varies based on screen density . In 160 dpi
screen, 1 dp = 1 pixel. Except for font size, use dp always.
sp: Scale Independent Pixel, scaled based on user’s font size
V. REFERENCES
www.developer.android.com
VI. RUBRICS
Program (50 (Excellent) (Good) (Fair) (Poor)
pts)
Program Program Program Program Program does
execution executes executes with executes with not execute (10
(20pts) correctly with less than 3 more than 3 – 11)
no syntax or errors (15 – errors (12 –
runtime errors 17 ) 14)
(18 – 20)
Correct output Program Output has Output has Output is
(20pts) displays minor errors multiple errors incorrect (10 -
correct output (15 – 17) (12 – 14 ) 11)
with no errors
(18 – 20)
Design of output Program Program Program does Output is poorly
(10pts) displays more displays not display the designed (5)
than expected minimally required output
(10) expected (6-7)
output (8 – 9)
Design of logic Program is Program has Program has Program is
(20pts) logically well slight logic significant logic incorrect (10 -
designed (18 – errors that do errors (12 – 11)
20) no significantly 14 )
affect the
results (15 –
17)
GJPRosales
Page |7
Standards Program is Few Several Program is
(20pts) stylistically well inappropriate inappropriate poorly written
designed (18 – design choices design choices (10 - 11)
20) (i.e. poor (i.e. poor
variable variable
names, names,
improper improper
indentation) (15 indentation) (12
– 17) – 14 )
Delivery The program The program The code was The code was
(10pts) was delivered was delivered within 2 weeks more than 2
on time. (10) within a week of the due date. weeks overdue
of the due date. (6 – 7) (5)
(8 – 9)
Task 1:
Task 2:
GJPRosales