Вы находитесь на странице: 1из 12

Page |1

INFORMATION TECHNOLOGY AND INFORMATION SYSTEM


DEPARTMENT

MOBILE DEVELOPMENT

EXERCISE

3
VIEW CONTROL ACTIONS

NAME SECTION

DATE PERFORMED DATE FINISHED

GJPRosales
Page |2

I. OBJECTIVES

At the end of this exercise, students must be able to:


a) Design android views with different UI controls.
b) Reference each control to Java code for actions.
c) Apply onClick() event using Java code and xml code.
d) Apply the assigned layout for views.
e) Construct an event response for each control.
f) Construct a custom control for selected views.

II. BACKGROUND INFORMATION

In order to accomplish this exercise, the student must have a clear understanding of
the following topics:
• Java Classes
• Method structure
• Event handling
• Object referencing

III. EXPERIMENTAL PROCEDURE

Overview

This programming exercise demonstrates the use of different UI Controls, calling


events method and apply some operations.

TASK 1.
1. Create a new android project

Project Name: AndroidAppTwo

2. Design your layout as shown below:

Plain
Text

GJPRosales
Page |3

3. add the given xml statements in the strings.xml (inside the res/values/ folder)

4. change the values of each control as shown below:

5. change the ID of each control.

GJPRosales
Page |4

6. add image resource in Text Image Button. Go to the code view of your
activity_main.xml and add an xml statement to btn_txt_image and change the
string value to mail.

7. open MainActivity.java and add the following codes

GJPRosales
Page |5

8. run the application and click the text button.

9. add xml statement for onClick event on each view control.

GJPRosales
Page |6

10. Modify the MainActivity.java given the complete code below

GJPRosales
Page |7

GJPRosales
Page |8

GJPRosales
Page |9

GJPRosales
P a g e | 10

TASK 2. OUTPUT
1. Using any screen recording applications. Navigate your application by showing
provided screenshots below:

GJPRosales
P a g e | 11

IV. QUESTION AND ANSWER

1. What are new controls you encountered here in Mobile Development. Does it
helpful in your future activities? Cite some examples on what scenario you are
going to use that control.

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)
Standards Program is Few Several Program is

GJPRosales
P a g e | 12

(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)

GJPRosales

Вам также может понравиться