SlideShare a Scribd company logo
1 of 31
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

OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]Daffodil International University
 
Report file on Web technology(html5 and css3)
Report file on Web technology(html5 and css3)Report file on Web technology(html5 and css3)
Report file on Web technology(html5 and css3)PCG Solution
 
Emotion Detection in text
Emotion Detection in text Emotion Detection in text
Emotion Detection in text kashif kashif
 
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1Garry D. Lasaga
 
Assignment problem branch and bound.pptx
Assignment problem branch and bound.pptxAssignment problem branch and bound.pptx
Assignment problem branch and bound.pptxKrishnaVardhan50
 
Face Recognition Attendance System
Face Recognition Attendance System Face Recognition Attendance System
Face Recognition Attendance System Shreya Dandavate
 
State space search
State space search State space search
State space search Timothy Makgato
 
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Simplilearn
 
Knowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningSagacious IT Solution
 
Object and pose detection
Object and pose detectionObject and pose detection
Object and pose detectionAshwinBicholiya
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)Bablu Shofi
 
State Space Search(2)
State Space Search(2)State Space Search(2)
State Space Search(2)luzenith_g
 
NAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERNAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERKnoldus Inc.
 
Heart disease prediction using machine learning algorithm
Heart disease prediction using machine learning algorithm Heart disease prediction using machine learning algorithm
Heart disease prediction using machine learning algorithm Kedar Damkondwar
 
Software Engineering unit 4
Software Engineering unit 4Software Engineering unit 4
Software Engineering unit 4Abhimanyu Mishra
 
Iterative deepening search
Iterative deepening searchIterative deepening search
Iterative deepening searchAshis Kumar Chanda
 
Content based image retrieval(cbir)
Content based image retrieval(cbir)Content based image retrieval(cbir)
Content based image retrieval(cbir)paddu123
 
Expert system
Expert systemExpert system
Expert systemSagar Sharma
 

What's hot (20)

OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]
 
Weather Now
Weather NowWeather Now
Weather Now
 
Report file on Web technology(html5 and css3)
Report file on Web technology(html5 and css3)Report file on Web technology(html5 and css3)
Report file on Web technology(html5 and css3)
 
Emotion Detection in text
Emotion Detection in text Emotion Detection in text
Emotion Detection in text
 
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
 
Assignment problem branch and bound.pptx
Assignment problem branch and bound.pptxAssignment problem branch and bound.pptx
Assignment problem branch and bound.pptx
 
Face Recognition Attendance System
Face Recognition Attendance System Face Recognition Attendance System
Face Recognition Attendance System
 
State space search
State space search State space search
State space search
 
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
 
Knowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and Reasoning
 
Object and pose detection
Object and pose detectionObject and pose detection
Object and pose detection
 
AI: Learning in AI
AI: Learning in AI AI: Learning in AI
AI: Learning in AI
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)
 
State Space Search(2)
State Space Search(2)State Space Search(2)
State Space Search(2)
 
NAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERNAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIER
 
Heart disease prediction using machine learning algorithm
Heart disease prediction using machine learning algorithm Heart disease prediction using machine learning algorithm
Heart disease prediction using machine learning algorithm
 
Software Engineering unit 4
Software Engineering unit 4Software Engineering unit 4
Software Engineering unit 4
 
Iterative deepening search
Iterative deepening searchIterative deepening search
Iterative deepening search
 
Content based image retrieval(cbir)
Content based image retrieval(cbir)Content based image retrieval(cbir)
Content based image retrieval(cbir)
 
Expert system
Expert systemExpert system
Expert system
 

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 AlgorithmMrinmoy 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 Line Drawing Algorithm
Bresenham Line Drawing AlgorithmBresenham Line Drawing Algorithm
Bresenham Line Drawing AlgorithmMahesh Kodituwakku
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algoMohd Arif
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversionMohd Arif
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.Mohd Arif
 
computer graphics
computer graphicscomputer graphics
computer graphicsashpri156
 
Dda line-algorithm
Dda line-algorithmDda line-algorithm
Dda line-algorithmPraveen 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 & SnapshotsUsman 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

MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxxMAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx34ShreyaChauhan
 
Android training day 2
Android training day 2Android training day 2
Android training day 2Vivek 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 barKalluri 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).pptAnsarAhmad57
 
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 APIAhsanul Karim
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivitiesmaamir farooq
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activitiesmaamir farooq
 
Activity & Shared Preference
Activity & Shared PreferenceActivity & Shared Preference
Activity & Shared Preferencenationalmobileapps
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android AppsGil Irizarry
 
Android Bootcamp Tanzania:intents
Android Bootcamp Tanzania:intentsAndroid Bootcamp Tanzania:intents
Android Bootcamp Tanzania:intentsDenis Minja
 
Multiple Activity and Navigation Primer
Multiple Activity and Navigation PrimerMultiple Activity and Navigation Primer
Multiple Activity and Navigation PrimerAhsanul Karim
 
Android apps development
Android apps developmentAndroid apps development
Android apps developmentMonir Zzaman
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesAhsanul Karim
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesAhsanul Karim
 
AndroidLab_IT.pptx
AndroidLab_IT.pptxAndroidLab_IT.pptx
AndroidLab_IT.pptxAhmedKedir9
 
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.pdfAbdullahMunir32
 
Answer1)Responsive design is the idea where all the developed pag.pdf
Answer1)Responsive design is the idea where all the developed pag.pdfAnswer1)Responsive design is the idea where all the developed pag.pdf
Answer1)Responsive design is the idea where all the developed pag.pdfankitcomputer11
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2Vivek Bhusal
 

Similar to Android App To Display Employee Details (20)

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
 
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
 
Answer1)Responsive design is the idea where all the developed pag.pdf
Answer1)Responsive design is the idea where all the developed pag.pdfAnswer1)Responsive design is the idea where all the developed pag.pdf
Answer1)Responsive design is the idea where all the developed pag.pdf
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2
 

Recently uploaded

Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 

Recently uploaded (20)

Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 

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