CSNB544 Lab7
CSNB544 Lab7
(2016)
Course Outcome
CO1:
Explain the development techniques, constraints and
challenges in developing a mobile application.
CO2: Design an application suitable to be used in a mobile device.
CO3: Develop a useable mobile application.
CO4: Work effectively in a development team.
CO5:
Communicate ideas and design decisions among team
members as well as to other interested parties.
Coverage
X
X
X
CalculatorActivity.java
Button bSave,bRead;
TextView tvStored;
Within
protected void onCreate(Bundle savedInstanceState) {
CalculatorActivity.java
bSave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
data=tvDisplayResult.getText().toString() + "\n";
try {
FileOutputStream fOut = openFileOutput(file, Context.MODE_APPEND);
fOut.write(data.getBytes());
fOut.close();
Toast.makeText(getBaseContext(),"file saved",Toast.LENGTH_SHORT).show();
}
catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
8. Deployment
Deploy the app. Your program should be able to save and display the stored values.
9. Create a new XML page for Record.
Create a new XML file name, activity_record.xml.
Paste the following code.
activity_record.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical">
</LinearLayout>
Student 1
SN095632
Hexagon Jeyaram A/L Thangarasah
Student 2
SN094851
Surendar Rao A/L Kanisan
Exercise
Provide the following screen capture as a proof of the completion of the following activities.
Num.
Marks
Allocation
Marks
10
11
13
14
15