SlideShare a Scribd company logo
Android Application Development
Android app to display employee details – Group 1 Page 1
Version 2.2 (Froyo)
A Project Report
On
“Android app to display Employee details
For Android Phones”
Assigned by:
Ganesh Kumar
Android Application Development
Android app to display employee details – Group 1 Page 2
Self-Declaration
All the below information has been provided to the best of our knowledge as part of the
Application development for the documentation purpose only for the demonstration.
Group – 1 Detail:
Index
S.No Content Information
1 Introductionof Application
2 Dependencies /Limitations
3 Application Design
4 Application Output
5 Output file
Android Application Development
Android app to display employee details – Group 1 Page 3
Roles of our Team:
MEMBER: ROLE:
SAIKRISHNA TANGUTURU Project Lead
TINNALURI V N PRASANTH Dev Lead
SHENBAGAMOORTHY A Developer
PRANOB JYOTI KALITA Developer
RAYAPU MOSES Developer
ANURUPA K C Test Lead
KONDALA SUMATHI Tester
DASIKA KRISHNA Tester
ARUNJUNAISELVAM P Tester
SHEIK SANAVULLA Support
Android Application Development
Android app to display employee details – Group 1 Page 4
1. Introduction of Application:
This Application displays the employee details of a Particular employee. It will use the following
technique to search the details for the particular employee:-
 By matching the employee names.
 After fetching the employee from the list we can use the application to call or text
message(SMS) and Email.
This application will work on 2.2(Froyo) & higher versions.
Step 1 Basic Layout:
In this first step, we define the user interface for searching employees.
Code highlights:
EmployeeList.java: The default Activity of the application. setContentView() is used to set the layout to
main.xml.
main.xml: the layout for the default activity of the application.
Android Application Development
Android app to display employee details – Group 1 Page 5
Go To Index
Step: 2 Working with Lists
In this second step, we add a ListView component that will be used (in the following step) to display the
list of employees matching the search criteria. In this step, we just use an ArrayAdapter to display
sample data in the list.
Code highlights:
main.xml: The updated layout with the ListView.
EmployeeList.java: An ArrayAdapter is used to populate the ListView.
Android Application Development
Android app to display employee details – Group 1 Page 6
Go To Index
Step 3: Working with a SQLite Database
In this third step, we use a SQLite database to persist the employees. When the user clicks the Search
button, we query the database, and populate the list with the employees matching the search criteria.
Code highlights:
EmployeeList.java:
In onCreate(), we use the DatabaseHelper class to open the database.
In search(), we use a Cursor to query the database. We then use a SimpleCursorAdapter to bind the
ListView to the Cursor using a custom layout (employee_list_item) to display each item in the list.
DatabaseHelper.java: We extend SQLiteOpenHelper to manage the access to our database: If the
database doesn’t yet exist, we create the employee table and populate it with sample data.
employee_list_item.xml: Layout to display each item in the list.
Step 4: Using Intents and passing information between Activities
In this fourth step, we create an Activity to display the details of the employee selected in the list. We
start the EmployeeDetails activity by creating an Intent.
Android Application Development
Android app to display employee details – Group 1 Page 7
Go To Index
Code highlights:
EmployeeList.java: in onListItemClick, we create a new Intent for the EmployeeDetails class, add the
employee id to the intent using intent.putExtra(), and start a new Activity.
EmployeeDetails.java: The Employee details activity. We retrieve the id of the employee using
getIntent().getIntExtra(). We then use a Cursor to retrieve the employee details.
employee_details.xml: A simple layout to display the details of an employee.
Go To Index
Android Application Development
Android app to display employee details – Group 1 Page 8
Step 5: Calling, Emailing, and Texting an Employee
In this fifth step, we interact with some of the built-in capabilities of our phone. We use Intents to allow
the user to call, email, or text an employee. We reuse the EmployeeDetails Activity to allow the user to
display the details of the manager of the selected employee.
Code highlights:
EmployeeDetails.java:
In onCreate(), we build an array of actions (call, email, sms, view manager) available to the user
depending on the information available for the displayed employee (for example, we only create a “Call
mobile” action if the employee’s mobile phone number is available in the database).
EmployeeActionAdapter is a custom list adapter that binds each action in the actions array to the
action_list_item layout.
In onListItemClick(), we create an Intent corresponding to the action selected by the user, and start a
new activity with that intent.
action_list_item.xml: Layout for each action in the actions list.
employee_details.xml: Updated employee details layout.
Android Application Development
Android app to display employee details – Group 1 Page 9
Go To Index
Step 6: Navigating Up and Down the Org Chart
Code highlights:
DirectReports.java: A new Activity to display the direct reports of a specific employee.
direct_reports.xml: The layout for the DirectReports Activity.
EmployeeDetails.java: “View direct reports” is added to the list of actions. When the user selects that
action, a new Intent is created for the DirectReports Activity, and a new Activity is started using that
Intent.
DatabaseHelper.java: Instead of populating the database with hardcoded sample data, the employee
table is now created and populated from an XML file (sql.xml).
sql.xml: The xml file used to create and populate the employee table.
Android Application Development
Android app to display employee details – Group 1 Page 10
Go To Index
Search result for Mlchaelscott:
Go To Index
Android Application Development
Android app to display employee details – Group 1 Page 11
CODE:
Main.xml
The layout for the default activity of the application.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/searchText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<Button
android:id="@+id/searchButton"
android:text="Search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<ListView
Android Application Development
Android app to display employee details – Group 1 Page 12
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
EmployeeList.java:
The default Activity of the application.setContentView() is used to set the layout to main.xml.
In onCreate(), we use the DatabaseHelper class to open the database.
In search(), we use a Cursor to query the database. We then use a SimpleCursorAdapter to bind
the ListView to the Cursor using a custom layout (employee_list_item) to display each item in
the list.
packagesamples.employeedirectory;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
public class EmployeeList extends ListActivity {
protectedEditTextsearchText;
protectedSQLiteDatabasedb;
protected Cursor cursor;
protectedListAdapter adapter;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Android Application Development
Android app to display employee details – Group 1 Page 13
setContentView(R.layout.main);
db = (new DatabaseHelper(this)).getWritableDatabase();
searchText = (EditText) findViewById (R.id.searchText);
}
public void search(View view) {
// || is the concatenation operation in SQLite
cursor = db.rawQuery("SELECT _id, firstName, lastName, title FROM employee WHERE
firstName || ' ' || lastName LIKE ?",
new String[]{"%" + searchText.getText().toString() + "%"});
adapter = new SimpleCursorAdapter(
this,
R.layout.employee_list_item,
cursor,
new String[] {"firstName", "lastName", "title"},
newint[] {R.id.firstName, R.id.lastName, R.id.title});
setListAdapter(adapter);
}
public void onListItemClick(ListView parent, View view, int position, long id) {
Intent intent = new Intent(this, EmployeeDetails.class);
Cursor cursor = (Cursor) adapter.getItem(position);
intent.putExtra("EMPLOYEE_ID", cursor.getInt(cursor.getColumnIndex("_id")));
startActivity(intent);
}
}
Android Application Development
Android app to display employee details – Group 1 Page 14
DatabaseHelper.java
We extend SQLiteOpenHelper to manage the access to our database: If the database
doesn’t yet exist, we create the employee table and populate it with sample data.
packagesamples.employeedirectory;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DatabaseHelper extends SQLiteOpenHelper {
public static final String DATABASE_NAME = "employee_directory";
publicDatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, 1);
}
@Override
public void onCreate(SQLiteDatabasedb) {
/*
* Create the employee table and populate it with sample data.
* In step 6, we will move these hardcoded statements to an XML document.
*/
String sql = "CREATE TABLE IF NOT EXISTS employee (" +
"_id INTEGER PRIMARY KEY AUTOINCREMENT, " +
"firstName TEXT, " +
"lastName TEXT, " +
"title TEXT, " +
"officePhone TEXT, " +
"cellPhone TEXT, " +
"email TEXT, " +
"managerId INTEGER)";
db.execSQL(sql);
ContentValues values = new ContentValues();
values.put("firstName", "John");
values.put("lastName", "Smith");
Android Application Development
Android app to display employee details – Group 1 Page 15
values.put("title", "CEO");
values.put("officePhone", "617-219-2001");
values.put("cellPhone", "617-456-7890");
values.put("email", "jsmith@email.com");
db.insert("employee", "lastName", values);
values.put("firstName", "Robert");
values.put("lastName", "Jackson");
values.put("title", "VP Engineering");
values.put("officePhone", "617-219-3333");
values.put("cellPhone", "781-444-2222");
values.put("email", "rjackson@email.com");
values.put("managerId", "1");
db.insert("employee", "lastName", values);
values.put("firstName", "Marie");
values.put("lastName", "Potter");
values.put("title", "VP Sales");
values.put("officePhone", "617-219-2002");
values.put("cellPhone", "987-654-3210");
values.put("email", "mpotter@email.com");
values.put("managerId", "1");
db.insert("employee", "lastName", values);
values.put("firstName", "Lisa");
values.put("lastName", "Jordan");
values.put("title", "VP Marketing");
values.put("officePhone", "617-219-2003");
values.put("cellPhone", "987-654-7777");
values.put("email", "ljordan@email.com");
values.put("managerId", "2");
db.insert("employee", "lastName", values);
values.put("firstName", "Christophe");
values.put("lastName", "Coenraets");
values.put("title", "Evangelist");
values.put("officePhone", "617-219-0000");
values.put("cellPhone", "617-666-7777");
values.put("email", "ccoenrae@adobe.com");
values.put("managerId", "2");
db.insert("employee", "lastName", values);
Android Application Development
Android app to display employee details – Group 1 Page 16
values.put("firstName", "Paula");
values.put("lastName", "Brown");
values.put("title", "Director Engineering");
values.put("officePhone", "617-612-0987");
values.put("cellPhone", "617-123-9876");
values.put("email", "pbrown@email.com");
values.put("managerId", "2");
db.insert("employee", "lastName", values);
values.put("firstName", "Mark");
values.put("lastName", "Taylor");
values.put("title", "Lead Architect");
values.put("officePhone", "617-444-1122");
values.put("cellPhone", "617-555-3344");
values.put("email", "mtaylor@email.com");
values.put("managerId", "2");
db.insert("employee", "lastName", values);
}
@Override
public void onUpgrade(SQLiteDatabasedb, intoldVersion, intnewVersion) {
db.execSQL("DROP TABLE IF EXISTS employees");
onCreate(db);
}
}
Android Application Development
Android app to display employee details – Group 1 Page 17
EmployeeDetails.java
In onCreate(), we build an array of actions (call, email, sms, view manager) available to
the user depending on the information available for the displayed employee (for
example, we only create a “Call mobile” action if the employee’s mobile phone number
is available in the database).
EmployeeActionAdapter is a custom list adapter that binds each action in the actions
array to the action_list_item layout.
In onListItemClick(), we create an Intent corresponding to the action selected by the
user, and start a new activity with that intent.
packagesamples.employeedirectory;
import java.util.ArrayList;
import java.util.List;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
public class EmployeeDetails extends ListActivity {
protectedTextViewemployeeName;
protectedTextViewemployeeTitle;
protectedTextViewofficePhone;
protectedTextViewcellPhone;
protectedTextView email;
protectedintemployeeId;
Android Application Development
Android app to display employee details – Group 1 Page 18
protectedintmanagerId;
protected List<EmployeeAction> actions;
protectedEmployeeActionAdapter adapter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.employee_details);
employeeId = getIntent().getIntExtra("EMPLOYEE_ID", 0);
SQLiteDatabasedb = (new DatabaseHelper(this)).getWritableDatabase();
Cursor cursor = db.rawQuery("SELECT emp._id, emp.firstName, emp.lastName,
emp.title, emp.officePhone, emp.cellPhone, emp.email, emp.managerId,
mgr.firstNamemanagerFirstName, mgr.lastNamemanagerLastName FROM employee
emp LEFT OUTER JOIN employee mgr ON emp.managerId = mgr._id WHERE emp._id =
?",
new String[]{""+employeeId});
if (cursor.getCount() == 1)
{
cursor.moveToFirst();
employeeName = (TextView) findViewById(R.id.employeeName);
employeeName.setText(cursor.getString(cursor.getColumnIndex("firstName")) + " " +
cursor.getString(cursor.getColumnIndex("lastName")));
employeeTitle = (TextView) findViewById(R.id.title);
employeeTitle.setText(cursor.getString(cursor.getColumnIndex("title")));
actions = new ArrayList<EmployeeAction>();
String officePhone = cursor.getString(cursor.getColumnIndex("officePhone"));
if (officePhone != null) {
actions.add(new EmployeeAction("Call office", officePhone,
EmployeeAction.ACTION_CALL));
}
Android Application Development
Android app to display employee details – Group 1 Page 19
String cellPhone = cursor.getString(cursor.getColumnIndex("cellPhone"));
if (cellPhone != null) {
actions.add(new EmployeeAction("Call mobile", cellPhone,
EmployeeAction.ACTION_CALL));
actions.add(new EmployeeAction("SMS", cellPhone, EmployeeAction.ACTION_SMS));
}
String email = cursor.getString(cursor.getColumnIndex("email"));
if (email != null) {
actions.add(new EmployeeAction("Email", email, EmployeeAction.ACTION_EMAIL));
}
managerId = cursor.getInt(cursor.getColumnIndex("managerId"));
if (managerId>0) {
actions.add(new EmployeeAction("View manager",
cursor.getString(cursor.getColumnIndex("managerFirstName")) + " " +
cursor.getString(cursor.getColumnIndex("managerLastName")),
EmployeeAction.ACTION_VIEW));
}
adapter = new EmployeeActionAdapter();
setListAdapter(adapter);
}
}
public void onListItemClick(ListView parent, View view, int position, long id) {
EmployeeAction action = actions.get(position);
Intent intent;
switch (action.getType()) {
caseEmployeeAction.ACTION_CALL:
Uri callUri = Uri.parse("tel:" + action.getData());
intent = new Intent(Intent.ACTION_CALL, callUri);
startActivity(intent);
Android Application Development
Android app to display employee details – Group 1 Page 20
break;
caseEmployeeAction.ACTION_EMAIL:
intent = new Intent(Intent.ACTION_SEND);
intent.setType("plain/text");
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{action.getData()});
startActivity(intent);
break;
caseEmployeeAction.ACTION_SMS:
Uri smsUri = Uri.parse("sms:" + action.getData());
intent = new Intent(Intent.ACTION_VIEW, smsUri);
startActivity(intent);
break;
caseEmployeeAction.ACTION_VIEW:
intent = new Intent(this, EmployeeDetails.class);
intent.putExtra("EMPLOYEE_ID", managerId);
startActivity(intent);
break;
}
}
classEmployeeActionAdapter extends ArrayAdapter<EmployeeAction> {
EmployeeActionAdapter() {
super(EmployeeDetails.this, R.layout.action_list_item, actions);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
EmployeeAction action = actions.get(position);
LayoutInflaterinflater = getLayoutInflater();
View view = inflater.inflate(R.layout.action_list_item, parent, false);
TextView label = (TextView) view.findViewById(R.id.label);
label.setText(action.getLabel());
TextView data = (TextView) view.findViewById(R.id.data);
data.setText(action.getData());
Android Application Development
Android app to display employee details – Group 1 Page 21
return view;
}
}
}
DirectReports.java
A new Activity to display the direct reports of a specific employee.
packagesamples.employeedirectory;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.ListAdapter;
import android.widget.SimpleCursorAdapter;
import android.widget.ListView;
import android.widget.TextView;
public class DirectReports extends ListActivity {
protected Cursor cursor=null;
protectedListAdapter adapter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.direct_reports);
SQLiteDatabasedb = (new DatabaseHelper(this)).getWritableDatabase();
Android Application Development
Android app to display employee details – Group 1 Page 22
intemployeeId = getIntent().getIntExtra("EMPLOYEE_ID", 0);
Cursor cursor = db.rawQuery("SELECT _id, firstName, lastName, title FROM
employee WHERE _id = ?",
new String[]{""+employeeId});
if (cursor.getCount() != 1)
{
return;
}
cursor.moveToFirst();
TextViewemployeeNameText = (TextView) findViewById(R.id.employeeName);
employeeNameText.setText(cursor.getString(cursor.getColumnIndex("firstName")) + " "
+ cursor.getString(cursor.getColumnIndex("lastName")));
TextViewtitleText = (TextView) findViewById(R.id.title);
titleText.setText(cursor.getString(cursor.getColumnIndex("title")));
cursor = db.rawQuery("SELECT _id, firstName, lastName, title, officePhone, cellPhone,
email FROM employee WHERE managerId = ?",
new String[]{""+employeeId});
adapter = new SimpleCursorAdapter(
this,
R.layout.employee_list_item,
cursor,
new String[] {"firstName", "lastName", "title"},
newint[] {R.id.firstName, R.id.lastName, R.id.title});
setListAdapter(adapter);
}
public void onListItemClick(ListView parent, View view, int position, long id) {
Intent intent = new Intent(this, EmployeeDetails.class);
Cursor cursor = (Cursor) adapter.getItem(position);
intent.putExtra("EMPLOYEE_ID", cursor.getInt(cursor.getColumnIndex("_id")));
startActivity(intent);
}
Android Application Development
Android app to display employee details – Group 1 Page 23
}
2. Dependencies /Limitations:
This Application will work only on Android based Platforms such as mobile devices. It will not
work on Windows Platforms (which devices are using windows OS such as Windows Phone or
Computers).
Android Application Development
Android app to display employee details – Group 1 Page 24
3. Application Design
employee_list_item.xml
Layout to display each item in the list
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="8px">
<TextView
android:id="@+id/firstName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/lastName"
android:layout_marginLeft="6px"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/firstName"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/firstName"/>
</RelativeLayout>
Android Application Development
Android app to display employee details – Group 1 Page 25
action_list_item.xml
Layout for each action in the actions list.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="8px">
<!--
<ImageView
android:id="@+id/icon"
android:layout_width="22px"
android:layout_height="wrap_content"
android:src="@drawable/icon"/>
-->
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"/>
<TextView
android:id="@+id/data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16px"/>
</LinearLayout>
Android Application Development
Android app to display employee details – Group 1 Page 26
employee_details.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/employeeName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/officePhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/cellPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
Android Application Development
Android app to display employee details – Group 1 Page 27
direct_reports.xml
The layout for the DirectReports Activity.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#505050"
android:padding="8px">
<TextView
android:id="@+id/employeeName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"/>
</LinearLayout>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
Go To Index
Android Application Development
Android app to display employee details – Group 1 Page 28
sql.xml
The xml file used to create and populate the employee table.
<sql>
<statement>
CREATE TABLE IF NOT EXISTS employee (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
firstName VARCHAR(50),
lastName VARCHAR(50),
title VARCHAR(50),
department VARCHAR(50),
managerId INTEGER,
city VARCHAR(50),
officePhone VARCHAR(30),
cellPhone VARCHAR(30),
email VARCHAR(30),
picture VARCHAR(200))
</statement>
<statement>INSERT INTO employee VALUES(1,'Ryan','Howard','Vice President, North East',
'Management', NULL, 'Scranton','570-999-8888','570-999-
8887','ryan@dundermifflin.com','howard.jpg')</statement>
<statement>INSERT INTO employee VALUES(2,'Michael','Scott','Regional
Manager','Management',1,'Scranton','570-888-9999','570-222-
3333','michael@dundermifflin.com','scott.jpg')</statement>
<statement>INSERT INTO employee VALUES(3,'Dwight','Schrute','Assistant Regional
Manager','Management',2,'Scranton','570-444-4444','570-333-
3333','dwight@dundermifflin.com','schrute.jpg')</statement>
<statement>INSERT INTO employee VALUES(4,'Jim','Halpert','Assistant Regional
Manager','Manage',2,'Scranton','570-222-2121','570-999-
1212','jim@dundermifflin.com','halpert.jpg')</statement>
<statement>INSERT INTO employee
VALUES(5,'Pamela','Beesly','Receptionist','',2,'Scranton','570-999-5555','570-999-
7474','pam@dundermifflin.com','beesly.jpg')</statement>
<statement>INSERT INTO employee VALUES(6,'Angela','Martin','Senior
Accountant','Accounting',2,'Scranton','570-555-9696','570-999-
3232','angela@dundermifflin.com','martin.jpg')</statement>
<statement>INSERT INTO employee
VALUES(7,'Kevin','Malone','Accountant','Accounting',6,'Scranton','570-777-9696','570-111-
2525','kmalone@dundermifflin.com','malone.jpg')</statement>
Android Application Development
Android app to display employee details – Group 1 Page 29
<statement>INSERT INTO employee
VALUES(8,'Oscar','Martinez','Accountant','Accounting',6,'Scranton','570-321-9999','570-585-
3333','oscar@dundermifflin.com','martinez.jpg')</statement>
<statement>INSERT INTO employee VALUES(9,'Creed','Bratton','Quality
Assurance','Customer Services',2,'Scranton','570-222-6666','333-
8585','creed@dundermifflin.com','bratton.jpg')</statement>
<statement>INSERT INTO employee VALUES(10,'Andy','Bernard','Sales
Director','Sales',2,'Scranton','570-555-0000','570-546-
9999','andy@dundermifflin.com','bernard.jpg')</statement>
<statement>INSERT INTO employee VALUES(11,'Phyllis','Lapin','Sales
Representative','Sales',10,'Scranton','570-141-3333','570-888-
6666','phyllis@dundermifflin.com','lapin.jpg')</statement>
<statement>INSERT INTO employee VALUES(12,'Stanley','Hudson','Sales
Representative','Sales',10,'Scranton','570-700-6666','570-777-
6666','shudson@dundermifflin.com','hudson.jpg')</statement>
<statement>INSERT INTO employee VALUES(13,'Meredith','Palmer','Supplier
Relations','Customer Services',2,'Scranton','570-555-8888','570-777-
2222','meredith@dundermifflin.com','palmer.jpg')</statement>
<statement>INSERT INTO employee VALUES(14,'Kelly','Kapoor','Customer Service
Rep.','Customer Services',2,'Scranton','570-123-9654','570-125-
3666','kelly@dundermifflin.com','kapoor.jpg')</statement>
</sql>
Go To Index
Android Application Development
Android app to display employee details – Group 1 Page 30
4. Application Output:
Output file:
Go To Index
Android Application Development
Android app to display employee details – Group 1 Page 31

More Related Content

What's hot

UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
Kartik Raghuvanshi
 
android activity
android activityandroid activity
android activity
Deepa Rani
 
Characteristics of oop
Characteristics of oopCharacteristics of oop
Characteristics of oop
Rasim Izhar Ali
 
Delphi cost estimation model
Delphi cost estimation modelDelphi cost estimation model
Delphi cost estimation model
Shashwat Shriparv
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Sudarsun Santhiappan
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
Md.Al-imran Roton
 
Sdi & mdi
Sdi & mdiSdi & mdi
Sdi & mdi
BABAVALI S
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
Tech_MX
 
[OOP - Lec 07] Access Specifiers
[OOP - Lec 07] Access Specifiers[OOP - Lec 07] Access Specifiers
[OOP - Lec 07] Access Specifiers
Muhammad Hammad Waseem
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
Babeetha Muruganantham
 
Collections - Lists, Sets
Collections - Lists, Sets Collections - Lists, Sets
Collections - Lists, Sets
Hitesh-Java
 
Classes and Objects
Classes and Objects  Classes and Objects
Classes and Objects
yndaravind
 
Constructor in java
Constructor in javaConstructor in java
Constructor in java
Pavith Gunasekara
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
Asraa Batool
 
Class and object_diagram
Class  and object_diagramClass  and object_diagram
Class and object_diagram
Sadhana28
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
Githushan Gengaparam
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
Raja Sekhar
 
Inheritance in JAVA PPT
Inheritance  in JAVA PPTInheritance  in JAVA PPT
Inheritance in JAVA PPT
Pooja Jaiswal
 
Inter threadcommunication.38
Inter threadcommunication.38Inter threadcommunication.38
Inter threadcommunication.38
myrajendra
 
Interface in java
Interface in javaInterface in java
Interface in java
PhD Research Scholar
 

What's hot (20)

UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
android activity
android activityandroid activity
android activity
 
Characteristics of oop
Characteristics of oopCharacteristics of oop
Characteristics of oop
 
Delphi cost estimation model
Delphi cost estimation modelDelphi cost estimation model
Delphi cost estimation model
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
 
Sdi & mdi
Sdi & mdiSdi & mdi
Sdi & mdi
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
[OOP - Lec 07] Access Specifiers
[OOP - Lec 07] Access Specifiers[OOP - Lec 07] Access Specifiers
[OOP - Lec 07] Access Specifiers
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Collections - Lists, Sets
Collections - Lists, Sets Collections - Lists, Sets
Collections - Lists, Sets
 
Classes and Objects
Classes and Objects  Classes and Objects
Classes and Objects
 
Constructor in java
Constructor in javaConstructor in java
Constructor in java
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
 
Class and object_diagram
Class  and object_diagramClass  and object_diagram
Class and object_diagram
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
 
Inheritance in JAVA PPT
Inheritance  in JAVA PPTInheritance  in JAVA PPT
Inheritance in JAVA PPT
 
Inter threadcommunication.38
Inter threadcommunication.38Inter threadcommunication.38
Inter threadcommunication.38
 
Interface in java
Interface in javaInterface in java
Interface in java
 

Viewers also liked

Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
Saikrishna Tanguturu
 
Bressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmBressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing Algorithm
Mrinmoy Dalal
 
Bresenham's line algo.
Bresenham's line algo.Bresenham's line algo.
Bresenham's line algo.
Mohd Arif
 
Ellipses drawing algo.
Ellipses drawing algo.Ellipses drawing algo.
Ellipses drawing algo.
Mohd Arif
 
Bresenham circle
Bresenham circleBresenham circle
Bresenham circle
Taher Barodawala
 
Final report ehr1
Final report ehr1Final report ehr1
Final report ehr1
sagar_paperwala
 
Android Report
Android ReportAndroid Report
Android Report
Ganesh Waghmare
 
Bresenham Line Drawing Algorithm
Bresenham Line Drawing AlgorithmBresenham Line Drawing Algorithm
Bresenham Line Drawing Algorithm
Mahesh Kodituwakku
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algo
Mohd Arif
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversion
Mohd Arif
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.
Mohd Arif
 
computer graphics
computer graphicscomputer graphics
computer graphics
ashpri156
 
Dda line-algorithm
Dda line-algorithmDda line-algorithm
Dda line-algorithm
Praveen Kumar
 
My Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & SnapshotsMy Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & Snapshots
Usman Sait
 

Viewers also liked (14)

Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
 
Bressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmBressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing Algorithm
 
Bresenham's line algo.
Bresenham's line algo.Bresenham's line algo.
Bresenham's line algo.
 
Ellipses drawing algo.
Ellipses drawing algo.Ellipses drawing algo.
Ellipses drawing algo.
 
Bresenham circle
Bresenham circleBresenham circle
Bresenham circle
 
Final report ehr1
Final report ehr1Final report ehr1
Final report ehr1
 
Android Report
Android ReportAndroid Report
Android Report
 
Bresenham Line Drawing Algorithm
Bresenham Line Drawing AlgorithmBresenham Line Drawing Algorithm
Bresenham Line Drawing Algorithm
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algo
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversion
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.
 
computer graphics
computer graphicscomputer graphics
computer graphics
 
Dda line-algorithm
Dda line-algorithmDda line-algorithm
Dda line-algorithm
 
My Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & SnapshotsMy Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & Snapshots
 

Similar to Android App To Display Employee Details

Mobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsMobile Application Development-Components and Layouts
Mobile Application Development-Components and Layouts
Chandrakant Divate
 
Android session 2
Android session 2Android session 2
Android session 2
Ahesanali Suthar
 
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxxMAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
34ShreyaChauhan
 
Android training day 2
Android training day 2Android training day 2
Android training day 2
Vivek Bhusal
 
Chapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action barChapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action bar
Kalluri Vinay Reddy
 
MAD-Lec8 Spinner Adapater and Intents (1).ppt
MAD-Lec8 Spinner Adapater and Intents (1).pptMAD-Lec8 Spinner Adapater and Intents (1).ppt
MAD-Lec8 Spinner Adapater and Intents (1).ppt
AnsarAhmad57
 
Day 15: Content Provider: Using Contacts API
Day 15: Content Provider: Using Contacts APIDay 15: Content Provider: Using Contacts API
Day 15: Content Provider: Using Contacts API
Ahsanul Karim
 
Android Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesAndroid Application Components with Implementation & Examples
Android Application Components with Implementation & Examples
Chandrakant Divate
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivities
maamir farooq
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activities
maamir farooq
 
Activity & Shared Preference
Activity & Shared PreferenceActivity & Shared Preference
Activity & Shared Preference
nationalmobileapps
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
Gil Irizarry
 
Android Bootcamp Tanzania:intents
Android Bootcamp Tanzania:intentsAndroid Bootcamp Tanzania:intents
Android Bootcamp Tanzania:intents
Denis Minja
 
Multiple Activity and Navigation Primer
Multiple Activity and Navigation PrimerMultiple Activity and Navigation Primer
Multiple Activity and Navigation Primer
Ahsanul Karim
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
Monir Zzaman
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through Activities
Ahsanul Karim
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through Activities
Ahsanul Karim
 
AndroidLab_IT.pptx
AndroidLab_IT.pptxAndroidLab_IT.pptx
AndroidLab_IT.pptx
AhmedKedir9
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdf
AbdullahMunir32
 
Android list view tutorial by Javatechig
Android list view tutorial by JavatechigAndroid list view tutorial by Javatechig
Android list view tutorial by Javatechig
Javatechig Resources for Developers
 

Similar to Android App To Display Employee Details (20)

Mobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsMobile Application Development-Components and Layouts
Mobile Application Development-Components and Layouts
 
Android session 2
Android session 2Android session 2
Android session 2
 
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxxMAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
 
Android training day 2
Android training day 2Android training day 2
Android training day 2
 
Chapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action barChapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action bar
 
MAD-Lec8 Spinner Adapater and Intents (1).ppt
MAD-Lec8 Spinner Adapater and Intents (1).pptMAD-Lec8 Spinner Adapater and Intents (1).ppt
MAD-Lec8 Spinner Adapater and Intents (1).ppt
 
Day 15: Content Provider: Using Contacts API
Day 15: Content Provider: Using Contacts APIDay 15: Content Provider: Using Contacts API
Day 15: Content Provider: Using Contacts API
 
Android Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesAndroid Application Components with Implementation & Examples
Android Application Components with Implementation & Examples
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivities
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activities
 
Activity & Shared Preference
Activity & Shared PreferenceActivity & Shared Preference
Activity & Shared Preference
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
Android Bootcamp Tanzania:intents
Android Bootcamp Tanzania:intentsAndroid Bootcamp Tanzania:intents
Android Bootcamp Tanzania:intents
 
Multiple Activity and Navigation Primer
Multiple Activity and Navigation PrimerMultiple Activity and Navigation Primer
Multiple Activity and Navigation Primer
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through Activities
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through Activities
 
AndroidLab_IT.pptx
AndroidLab_IT.pptxAndroidLab_IT.pptx
AndroidLab_IT.pptx
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdf
 
Android list view tutorial by Javatechig
Android list view tutorial by JavatechigAndroid list view tutorial by Javatechig
Android list view tutorial by Javatechig
 

Recently uploaded

Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
PreethaV16
 
Supermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdfSupermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdf
Kamal Acharya
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
ijseajournal
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
PriyankaKilaniya
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
uqyfuc
 
Blood finder application project report (1).pdf
Blood finder application project report (1).pdfBlood finder application project report (1).pdf
Blood finder application project report (1).pdf
Kamal Acharya
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
P5 Working Drawings.pdf floor plan, civil
P5 Working Drawings.pdf floor plan, civilP5 Working Drawings.pdf floor plan, civil
P5 Working Drawings.pdf floor plan, civil
AnasAhmadNoor
 
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
Paris Salesforce Developer Group
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Transcat
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
sydezfe
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
Accident detection system project report.pdf
Accident detection system project report.pdfAccident detection system project report.pdf
Accident detection system project report.pdf
Kamal Acharya
 
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
PreethaV16
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...
Prakhyath Rai
 
Height and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdfHeight and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdf
q30122000
 

Recently uploaded (20)

Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
 
Supermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdfSupermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdf
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Blood finder application project report (1).pdf
Blood finder application project report (1).pdfBlood finder application project report (1).pdf
Blood finder application project report (1).pdf
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
P5 Working Drawings.pdf floor plan, civil
P5 Working Drawings.pdf floor plan, civilP5 Working Drawings.pdf floor plan, civil
P5 Working Drawings.pdf floor plan, civil
 
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
Accident detection system project report.pdf
Accident detection system project report.pdfAccident detection system project report.pdf
Accident detection system project report.pdf
 
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...
 
Height and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdfHeight and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdf
 

Android App To Display Employee Details

  • 1. Android Application Development Android app to display employee details – Group 1 Page 1 Version 2.2 (Froyo) A Project Report On “Android app to display Employee details For Android Phones” Assigned by: Ganesh Kumar
  • 2. Android Application Development Android app to display employee details – Group 1 Page 2 Self-Declaration All the below information has been provided to the best of our knowledge as part of the Application development for the documentation purpose only for the demonstration. Group – 1 Detail: Index S.No Content Information 1 Introductionof Application 2 Dependencies /Limitations 3 Application Design 4 Application Output 5 Output file
  • 3. Android Application Development Android app to display employee details – Group 1 Page 3 Roles of our Team: MEMBER: ROLE: SAIKRISHNA TANGUTURU Project Lead TINNALURI V N PRASANTH Dev Lead SHENBAGAMOORTHY A Developer PRANOB JYOTI KALITA Developer RAYAPU MOSES Developer ANURUPA K C Test Lead KONDALA SUMATHI Tester DASIKA KRISHNA Tester ARUNJUNAISELVAM P Tester SHEIK SANAVULLA Support
  • 4. Android Application Development Android app to display employee details – Group 1 Page 4 1. Introduction of Application: This Application displays the employee details of a Particular employee. It will use the following technique to search the details for the particular employee:-  By matching the employee names.  After fetching the employee from the list we can use the application to call or text message(SMS) and Email. This application will work on 2.2(Froyo) & higher versions. Step 1 Basic Layout: In this first step, we define the user interface for searching employees. Code highlights: EmployeeList.java: The default Activity of the application. setContentView() is used to set the layout to main.xml. main.xml: the layout for the default activity of the application.
  • 5. Android Application Development Android app to display employee details – Group 1 Page 5 Go To Index Step: 2 Working with Lists In this second step, we add a ListView component that will be used (in the following step) to display the list of employees matching the search criteria. In this step, we just use an ArrayAdapter to display sample data in the list. Code highlights: main.xml: The updated layout with the ListView. EmployeeList.java: An ArrayAdapter is used to populate the ListView.
  • 6. Android Application Development Android app to display employee details – Group 1 Page 6 Go To Index Step 3: Working with a SQLite Database In this third step, we use a SQLite database to persist the employees. When the user clicks the Search button, we query the database, and populate the list with the employees matching the search criteria. Code highlights: EmployeeList.java: In onCreate(), we use the DatabaseHelper class to open the database. In search(), we use a Cursor to query the database. We then use a SimpleCursorAdapter to bind the ListView to the Cursor using a custom layout (employee_list_item) to display each item in the list. DatabaseHelper.java: We extend SQLiteOpenHelper to manage the access to our database: If the database doesn’t yet exist, we create the employee table and populate it with sample data. employee_list_item.xml: Layout to display each item in the list. Step 4: Using Intents and passing information between Activities In this fourth step, we create an Activity to display the details of the employee selected in the list. We start the EmployeeDetails activity by creating an Intent.
  • 7. Android Application Development Android app to display employee details – Group 1 Page 7 Go To Index Code highlights: EmployeeList.java: in onListItemClick, we create a new Intent for the EmployeeDetails class, add the employee id to the intent using intent.putExtra(), and start a new Activity. EmployeeDetails.java: The Employee details activity. We retrieve the id of the employee using getIntent().getIntExtra(). We then use a Cursor to retrieve the employee details. employee_details.xml: A simple layout to display the details of an employee. Go To Index
  • 8. Android Application Development Android app to display employee details – Group 1 Page 8 Step 5: Calling, Emailing, and Texting an Employee In this fifth step, we interact with some of the built-in capabilities of our phone. We use Intents to allow the user to call, email, or text an employee. We reuse the EmployeeDetails Activity to allow the user to display the details of the manager of the selected employee. Code highlights: EmployeeDetails.java: In onCreate(), we build an array of actions (call, email, sms, view manager) available to the user depending on the information available for the displayed employee (for example, we only create a “Call mobile” action if the employee’s mobile phone number is available in the database). EmployeeActionAdapter is a custom list adapter that binds each action in the actions array to the action_list_item layout. In onListItemClick(), we create an Intent corresponding to the action selected by the user, and start a new activity with that intent. action_list_item.xml: Layout for each action in the actions list. employee_details.xml: Updated employee details layout.
  • 9. Android Application Development Android app to display employee details – Group 1 Page 9 Go To Index Step 6: Navigating Up and Down the Org Chart Code highlights: DirectReports.java: A new Activity to display the direct reports of a specific employee. direct_reports.xml: The layout for the DirectReports Activity. EmployeeDetails.java: “View direct reports” is added to the list of actions. When the user selects that action, a new Intent is created for the DirectReports Activity, and a new Activity is started using that Intent. DatabaseHelper.java: Instead of populating the database with hardcoded sample data, the employee table is now created and populated from an XML file (sql.xml). sql.xml: The xml file used to create and populate the employee table.
  • 10. Android Application Development Android app to display employee details – Group 1 Page 10 Go To Index Search result for Mlchaelscott: Go To Index
  • 11. Android Application Development Android app to display employee details – Group 1 Page 11 CODE: Main.xml The layout for the default activity of the application. <?xml version="1.0" encoding="utf-8"?> <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/searchText" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1"/> <Button android:id="@+id/searchButton" android:text="Search" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> <ListView
  • 12. Android Application Development Android app to display employee details – Group 1 Page 12 android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="fill_parent"/> </LinearLayout> EmployeeList.java: The default Activity of the application.setContentView() is used to set the layout to main.xml. In onCreate(), we use the DatabaseHelper class to open the database. In search(), we use a Cursor to query the database. We then use a SimpleCursorAdapter to bind the ListView to the Cursor using a custom layout (employee_list_item) to display each item in the list. packagesamples.employeedirectory; import android.app.ListActivity; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.SimpleCursorAdapter; public class EmployeeList extends ListActivity { protectedEditTextsearchText; protectedSQLiteDatabasedb; protected Cursor cursor; protectedListAdapter adapter; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
  • 13. Android Application Development Android app to display employee details – Group 1 Page 13 setContentView(R.layout.main); db = (new DatabaseHelper(this)).getWritableDatabase(); searchText = (EditText) findViewById (R.id.searchText); } public void search(View view) { // || is the concatenation operation in SQLite cursor = db.rawQuery("SELECT _id, firstName, lastName, title FROM employee WHERE firstName || ' ' || lastName LIKE ?", new String[]{"%" + searchText.getText().toString() + "%"}); adapter = new SimpleCursorAdapter( this, R.layout.employee_list_item, cursor, new String[] {"firstName", "lastName", "title"}, newint[] {R.id.firstName, R.id.lastName, R.id.title}); setListAdapter(adapter); } public void onListItemClick(ListView parent, View view, int position, long id) { Intent intent = new Intent(this, EmployeeDetails.class); Cursor cursor = (Cursor) adapter.getItem(position); intent.putExtra("EMPLOYEE_ID", cursor.getInt(cursor.getColumnIndex("_id"))); startActivity(intent); } }
  • 14. Android Application Development Android app to display employee details – Group 1 Page 14 DatabaseHelper.java We extend SQLiteOpenHelper to manage the access to our database: If the database doesn’t yet exist, we create the employee table and populate it with sample data. packagesamples.employeedirectory; import android.content.ContentValues; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class DatabaseHelper extends SQLiteOpenHelper { public static final String DATABASE_NAME = "employee_directory"; publicDatabaseHelper(Context context) { super(context, DATABASE_NAME, null, 1); } @Override public void onCreate(SQLiteDatabasedb) { /* * Create the employee table and populate it with sample data. * In step 6, we will move these hardcoded statements to an XML document. */ String sql = "CREATE TABLE IF NOT EXISTS employee (" + "_id INTEGER PRIMARY KEY AUTOINCREMENT, " + "firstName TEXT, " + "lastName TEXT, " + "title TEXT, " + "officePhone TEXT, " + "cellPhone TEXT, " + "email TEXT, " + "managerId INTEGER)"; db.execSQL(sql); ContentValues values = new ContentValues(); values.put("firstName", "John"); values.put("lastName", "Smith");
  • 15. Android Application Development Android app to display employee details – Group 1 Page 15 values.put("title", "CEO"); values.put("officePhone", "617-219-2001"); values.put("cellPhone", "617-456-7890"); values.put("email", "jsmith@email.com"); db.insert("employee", "lastName", values); values.put("firstName", "Robert"); values.put("lastName", "Jackson"); values.put("title", "VP Engineering"); values.put("officePhone", "617-219-3333"); values.put("cellPhone", "781-444-2222"); values.put("email", "rjackson@email.com"); values.put("managerId", "1"); db.insert("employee", "lastName", values); values.put("firstName", "Marie"); values.put("lastName", "Potter"); values.put("title", "VP Sales"); values.put("officePhone", "617-219-2002"); values.put("cellPhone", "987-654-3210"); values.put("email", "mpotter@email.com"); values.put("managerId", "1"); db.insert("employee", "lastName", values); values.put("firstName", "Lisa"); values.put("lastName", "Jordan"); values.put("title", "VP Marketing"); values.put("officePhone", "617-219-2003"); values.put("cellPhone", "987-654-7777"); values.put("email", "ljordan@email.com"); values.put("managerId", "2"); db.insert("employee", "lastName", values); values.put("firstName", "Christophe"); values.put("lastName", "Coenraets"); values.put("title", "Evangelist"); values.put("officePhone", "617-219-0000"); values.put("cellPhone", "617-666-7777"); values.put("email", "ccoenrae@adobe.com"); values.put("managerId", "2"); db.insert("employee", "lastName", values);
  • 16. Android Application Development Android app to display employee details – Group 1 Page 16 values.put("firstName", "Paula"); values.put("lastName", "Brown"); values.put("title", "Director Engineering"); values.put("officePhone", "617-612-0987"); values.put("cellPhone", "617-123-9876"); values.put("email", "pbrown@email.com"); values.put("managerId", "2"); db.insert("employee", "lastName", values); values.put("firstName", "Mark"); values.put("lastName", "Taylor"); values.put("title", "Lead Architect"); values.put("officePhone", "617-444-1122"); values.put("cellPhone", "617-555-3344"); values.put("email", "mtaylor@email.com"); values.put("managerId", "2"); db.insert("employee", "lastName", values); } @Override public void onUpgrade(SQLiteDatabasedb, intoldVersion, intnewVersion) { db.execSQL("DROP TABLE IF EXISTS employees"); onCreate(db); } }
  • 17. Android Application Development Android app to display employee details – Group 1 Page 17 EmployeeDetails.java In onCreate(), we build an array of actions (call, email, sms, view manager) available to the user depending on the information available for the displayed employee (for example, we only create a “Call mobile” action if the employee’s mobile phone number is available in the database). EmployeeActionAdapter is a custom list adapter that binds each action in the actions array to the action_list_item layout. In onListItemClick(), we create an Intent corresponding to the action selected by the user, and start a new activity with that intent. packagesamples.employeedirectory; import java.util.ArrayList; import java.util.List; import android.app.ListActivity; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.net.Uri; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; public class EmployeeDetails extends ListActivity { protectedTextViewemployeeName; protectedTextViewemployeeTitle; protectedTextViewofficePhone; protectedTextViewcellPhone; protectedTextView email; protectedintemployeeId;
  • 18. Android Application Development Android app to display employee details – Group 1 Page 18 protectedintmanagerId; protected List<EmployeeAction> actions; protectedEmployeeActionAdapter adapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.employee_details); employeeId = getIntent().getIntExtra("EMPLOYEE_ID", 0); SQLiteDatabasedb = (new DatabaseHelper(this)).getWritableDatabase(); Cursor cursor = db.rawQuery("SELECT emp._id, emp.firstName, emp.lastName, emp.title, emp.officePhone, emp.cellPhone, emp.email, emp.managerId, mgr.firstNamemanagerFirstName, mgr.lastNamemanagerLastName FROM employee emp LEFT OUTER JOIN employee mgr ON emp.managerId = mgr._id WHERE emp._id = ?", new String[]{""+employeeId}); if (cursor.getCount() == 1) { cursor.moveToFirst(); employeeName = (TextView) findViewById(R.id.employeeName); employeeName.setText(cursor.getString(cursor.getColumnIndex("firstName")) + " " + cursor.getString(cursor.getColumnIndex("lastName"))); employeeTitle = (TextView) findViewById(R.id.title); employeeTitle.setText(cursor.getString(cursor.getColumnIndex("title"))); actions = new ArrayList<EmployeeAction>(); String officePhone = cursor.getString(cursor.getColumnIndex("officePhone")); if (officePhone != null) { actions.add(new EmployeeAction("Call office", officePhone, EmployeeAction.ACTION_CALL)); }
  • 19. Android Application Development Android app to display employee details – Group 1 Page 19 String cellPhone = cursor.getString(cursor.getColumnIndex("cellPhone")); if (cellPhone != null) { actions.add(new EmployeeAction("Call mobile", cellPhone, EmployeeAction.ACTION_CALL)); actions.add(new EmployeeAction("SMS", cellPhone, EmployeeAction.ACTION_SMS)); } String email = cursor.getString(cursor.getColumnIndex("email")); if (email != null) { actions.add(new EmployeeAction("Email", email, EmployeeAction.ACTION_EMAIL)); } managerId = cursor.getInt(cursor.getColumnIndex("managerId")); if (managerId>0) { actions.add(new EmployeeAction("View manager", cursor.getString(cursor.getColumnIndex("managerFirstName")) + " " + cursor.getString(cursor.getColumnIndex("managerLastName")), EmployeeAction.ACTION_VIEW)); } adapter = new EmployeeActionAdapter(); setListAdapter(adapter); } } public void onListItemClick(ListView parent, View view, int position, long id) { EmployeeAction action = actions.get(position); Intent intent; switch (action.getType()) { caseEmployeeAction.ACTION_CALL: Uri callUri = Uri.parse("tel:" + action.getData()); intent = new Intent(Intent.ACTION_CALL, callUri); startActivity(intent);
  • 20. Android Application Development Android app to display employee details – Group 1 Page 20 break; caseEmployeeAction.ACTION_EMAIL: intent = new Intent(Intent.ACTION_SEND); intent.setType("plain/text"); intent.putExtra(Intent.EXTRA_EMAIL, new String[]{action.getData()}); startActivity(intent); break; caseEmployeeAction.ACTION_SMS: Uri smsUri = Uri.parse("sms:" + action.getData()); intent = new Intent(Intent.ACTION_VIEW, smsUri); startActivity(intent); break; caseEmployeeAction.ACTION_VIEW: intent = new Intent(this, EmployeeDetails.class); intent.putExtra("EMPLOYEE_ID", managerId); startActivity(intent); break; } } classEmployeeActionAdapter extends ArrayAdapter<EmployeeAction> { EmployeeActionAdapter() { super(EmployeeDetails.this, R.layout.action_list_item, actions); } @Override public View getView(int position, View convertView, ViewGroup parent) { EmployeeAction action = actions.get(position); LayoutInflaterinflater = getLayoutInflater(); View view = inflater.inflate(R.layout.action_list_item, parent, false); TextView label = (TextView) view.findViewById(R.id.label); label.setText(action.getLabel()); TextView data = (TextView) view.findViewById(R.id.data); data.setText(action.getData());
  • 21. Android Application Development Android app to display employee details – Group 1 Page 21 return view; } } } DirectReports.java A new Activity to display the direct reports of a specific employee. packagesamples.employeedirectory; import android.app.ListActivity; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.view.View; import android.widget.ListAdapter; import android.widget.SimpleCursorAdapter; import android.widget.ListView; import android.widget.TextView; public class DirectReports extends ListActivity { protected Cursor cursor=null; protectedListAdapter adapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.direct_reports); SQLiteDatabasedb = (new DatabaseHelper(this)).getWritableDatabase();
  • 22. Android Application Development Android app to display employee details – Group 1 Page 22 intemployeeId = getIntent().getIntExtra("EMPLOYEE_ID", 0); Cursor cursor = db.rawQuery("SELECT _id, firstName, lastName, title FROM employee WHERE _id = ?", new String[]{""+employeeId}); if (cursor.getCount() != 1) { return; } cursor.moveToFirst(); TextViewemployeeNameText = (TextView) findViewById(R.id.employeeName); employeeNameText.setText(cursor.getString(cursor.getColumnIndex("firstName")) + " " + cursor.getString(cursor.getColumnIndex("lastName"))); TextViewtitleText = (TextView) findViewById(R.id.title); titleText.setText(cursor.getString(cursor.getColumnIndex("title"))); cursor = db.rawQuery("SELECT _id, firstName, lastName, title, officePhone, cellPhone, email FROM employee WHERE managerId = ?", new String[]{""+employeeId}); adapter = new SimpleCursorAdapter( this, R.layout.employee_list_item, cursor, new String[] {"firstName", "lastName", "title"}, newint[] {R.id.firstName, R.id.lastName, R.id.title}); setListAdapter(adapter); } public void onListItemClick(ListView parent, View view, int position, long id) { Intent intent = new Intent(this, EmployeeDetails.class); Cursor cursor = (Cursor) adapter.getItem(position); intent.putExtra("EMPLOYEE_ID", cursor.getInt(cursor.getColumnIndex("_id"))); startActivity(intent); }
  • 23. Android Application Development Android app to display employee details – Group 1 Page 23 } 2. Dependencies /Limitations: This Application will work only on Android based Platforms such as mobile devices. It will not work on Windows Platforms (which devices are using windows OS such as Windows Phone or Computers).
  • 24. Android Application Development Android app to display employee details – Group 1 Page 24 3. Application Design employee_list_item.xml Layout to display each item in the list <?xml version="1.0" encoding="utf-8"?> <RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="8px"> <TextView android:id="@+id/firstName" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/lastName" android:layout_marginLeft="6px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/firstName"/> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/firstName"/> </RelativeLayout>
  • 25. Android Application Development Android app to display employee details – Group 1 Page 25 action_list_item.xml Layout for each action in the actions list. <?xml version="1.0" encoding="utf-8"?> <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="8px"> <!-- <ImageView android:id="@+id/icon" android:layout_width="22px" android:layout_height="wrap_content" android:src="@drawable/icon"/> --> <TextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF"/> <TextView android:id="@+id/data" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="16px"/> </LinearLayout>
  • 26. Android Application Development Android app to display employee details – Group 1 Page 26 employee_details.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/employeeName" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/officePhone" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/cellPhone" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/email" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout>
  • 27. Android Application Development Android app to display employee details – Group 1 Page 27 direct_reports.xml The layout for the DirectReports Activity. <?xml version="1.0" encoding="utf-8"?> <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#505050" android:padding="8px"> <TextView android:id="@+id/employeeName" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF"/> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF"/> </LinearLayout> <ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent"/> </LinearLayout> Go To Index
  • 28. Android Application Development Android app to display employee details – Group 1 Page 28 sql.xml The xml file used to create and populate the employee table. <sql> <statement> CREATE TABLE IF NOT EXISTS employee ( _id INTEGER PRIMARY KEY AUTOINCREMENT, firstName VARCHAR(50), lastName VARCHAR(50), title VARCHAR(50), department VARCHAR(50), managerId INTEGER, city VARCHAR(50), officePhone VARCHAR(30), cellPhone VARCHAR(30), email VARCHAR(30), picture VARCHAR(200)) </statement> <statement>INSERT INTO employee VALUES(1,'Ryan','Howard','Vice President, North East', 'Management', NULL, 'Scranton','570-999-8888','570-999- 8887','ryan@dundermifflin.com','howard.jpg')</statement> <statement>INSERT INTO employee VALUES(2,'Michael','Scott','Regional Manager','Management',1,'Scranton','570-888-9999','570-222- 3333','michael@dundermifflin.com','scott.jpg')</statement> <statement>INSERT INTO employee VALUES(3,'Dwight','Schrute','Assistant Regional Manager','Management',2,'Scranton','570-444-4444','570-333- 3333','dwight@dundermifflin.com','schrute.jpg')</statement> <statement>INSERT INTO employee VALUES(4,'Jim','Halpert','Assistant Regional Manager','Manage',2,'Scranton','570-222-2121','570-999- 1212','jim@dundermifflin.com','halpert.jpg')</statement> <statement>INSERT INTO employee VALUES(5,'Pamela','Beesly','Receptionist','',2,'Scranton','570-999-5555','570-999- 7474','pam@dundermifflin.com','beesly.jpg')</statement> <statement>INSERT INTO employee VALUES(6,'Angela','Martin','Senior Accountant','Accounting',2,'Scranton','570-555-9696','570-999- 3232','angela@dundermifflin.com','martin.jpg')</statement> <statement>INSERT INTO employee VALUES(7,'Kevin','Malone','Accountant','Accounting',6,'Scranton','570-777-9696','570-111- 2525','kmalone@dundermifflin.com','malone.jpg')</statement>
  • 29. Android Application Development Android app to display employee details – Group 1 Page 29 <statement>INSERT INTO employee VALUES(8,'Oscar','Martinez','Accountant','Accounting',6,'Scranton','570-321-9999','570-585- 3333','oscar@dundermifflin.com','martinez.jpg')</statement> <statement>INSERT INTO employee VALUES(9,'Creed','Bratton','Quality Assurance','Customer Services',2,'Scranton','570-222-6666','333- 8585','creed@dundermifflin.com','bratton.jpg')</statement> <statement>INSERT INTO employee VALUES(10,'Andy','Bernard','Sales Director','Sales',2,'Scranton','570-555-0000','570-546- 9999','andy@dundermifflin.com','bernard.jpg')</statement> <statement>INSERT INTO employee VALUES(11,'Phyllis','Lapin','Sales Representative','Sales',10,'Scranton','570-141-3333','570-888- 6666','phyllis@dundermifflin.com','lapin.jpg')</statement> <statement>INSERT INTO employee VALUES(12,'Stanley','Hudson','Sales Representative','Sales',10,'Scranton','570-700-6666','570-777- 6666','shudson@dundermifflin.com','hudson.jpg')</statement> <statement>INSERT INTO employee VALUES(13,'Meredith','Palmer','Supplier Relations','Customer Services',2,'Scranton','570-555-8888','570-777- 2222','meredith@dundermifflin.com','palmer.jpg')</statement> <statement>INSERT INTO employee VALUES(14,'Kelly','Kapoor','Customer Service Rep.','Customer Services',2,'Scranton','570-123-9654','570-125- 3666','kelly@dundermifflin.com','kapoor.jpg')</statement> </sql> Go To Index
  • 30. Android Application Development Android app to display employee details – Group 1 Page 30 4. Application Output: Output file: Go To Index
  • 31. Android Application Development Android app to display employee details – Group 1 Page 31