College Events
College Events
The project “APP FOR COLLEGE EVENTS” is designed using Standard Android
4.0.3 platform.
The students of the college will be always interested and eager to attend events being
conducted by colleges. This App is an android application developed to manage them. With this
app, they can get information regarding various aspects like event schedules, both for college
staffs and students. Admin may announce their events related with different departments to
whole college.
The project contains admin, staff, student and view modules. The administrator login to
the mobile application and enters the staff information. The staff feeds the event location and
detail so that students can view and request for attending.
Then the staff will allow or deny the user to attend the event. Moreover, any message can
be communicated between staffs and students using this app. In addition, staffs will maintain the
attendance and marks details of students. Moreover, student can enter their feedbacks related
with events or staff behaviors. Only HOD can view the feedbacks about staffs behaviors.
The platform used to develop the application is Eclipse IDE (Mars) with Java 1.6
Standard Edition.
CONTENTS
ABSTRACT
1. INTRODUCTION
2. SYSTEM CONFIGURATION
2.1 HARDWARE CONFIGURATION
2.2 SOFTWARE CONFIGURATION
3. SYSTEM ANALYSIS
3.1 EXISTING SYSTEM
3.1.1 DRAWBACKS OF EXISTING SYSTEM
3.2 SYSTEM DEVELOPMENT
3.2.1 DESCRIPTION OF MODULES
4. SYSTEM TESTING AND DEVELOPMENT
4.1 INPUT DESIGN
4.2 OUTPUT DESIGN
4.3 DATABASE DESIGN
4.4 MODULE DESCRIPTION
4.5 DATAFLOW DIAGRAM
5. TESTING
6. SYSTEM IMPLEMENTATION
7. CONCLUSION
8. APPENDIX
8.1 SAMPLE CODING
8.2 SCREENSHOTS
9. REFERENCES
INTRODUCTION
The application encompasses several modules, including those for administrators, staff,
students, and general viewers. Administrators have the capability to manage staff information
and oversee event announcements across various departments. Staff members play a pivotal role
by entering event details and locations, managing student attendance requests, and maintaining
essential academic records such as attendance and grades. This structure ensures that students are
always informed about upcoming events and can actively participate in the college's vibrant
community.
Beyond event management, the app facilitates enhanced communication between staff
and students, allowing for the exchange of messages and feedback. Students can provide insights
regarding events and staff behaviors, which are then reviewed exclusively by the Head of
Department (HOD) to ensure privacy and constructive feedback loops. Developed using Eclipse
IDE (Mars) with Java 1.6 Standard Edition, this application not only modernizes the way college
events are managed but also fosters a more interactive and responsive educational environment.
2. SYSTEM CONFIGURATION
FRONT END
INTRODUCTION
Android is a mobile operating system (OS) currently developed by Google, based on the
Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and
tablets. Android's user interface is based on direct manipulation, using touch gestures that loosely
correspond to real-world actions, such as swiping, tapping and pinching, to manipulate on-screen
objects, along with a virtual keyboard for text input. In addition to touchscreen devices, Google
has further developed Android TV for televisions, Android Auto for cars, and Android Wear for
wrist watches, each with a specialized user interface.
Variants of Android are also used on notebooks, game consoles, digital cameras, and
other electronics. As of 2015, Android has the largest installed base of all operating systems. It is
the second most commonly used mobile operating system in the United States, while iOS is the
first.Initially developed by Android, Inc., which Google bought in 2005, Android was unveiled
in 2007, along with the founding of the Open Handset Alliance – a consortium of hardware,
software, and telecommunication companies devoted to advancing open standards for mobile
devices. As of July 2013, the Google Play store has had over one million Android applications
("apps") published, and over 50 billion applications downloaded.
Android's source code is released by Google under open source licenses, although most
Android devices ultimately ship with a combination of open source and proprietary software,
including proprietary software required for accessing Google services. [3] Android is popular with
technology companies that require a ready-made, low-cost and customizable operating system
for high-tech devices. Its open nature has encouraged a large community of developers and
enthusiasts to use the open-source code as a foundation for community-driven projects, which
add new features for advanced users or bring Android to devices originally shipped with other
operating systems.
At the same time, as Android has no centralised update system most Android devices fail
to receive security updates: research in 2015 concluded that almost 90% of Android phones in
use had known but unpatched security vulnerabilities due to lack of updates and support. The
success of Android has made it a target for patent litigation as part of the so-called "smartphone
wars" between technology companies.
Android, Inc. was founded in Palo Alto, California in October 2003 by Andy Rubin (co-
founder of Danger), Rich Miner (co-founder of Wildfire Communications, Inc.), Nick Sears
(once VP at T-Mobile), and Chris White (headed design and interface development at WebTV)
to develop, in Rubin's words, "smarter mobile devices that are more aware of its owner's location
and preferences". The early intentions of the company were to develop an advanced operating
system for digital cameras.
Though, when it was realized that the market for the devices was not large enough, the
company diverted its efforts toward producing a smartphone operating system that would rival
Symbian and Microsoft Windows Mobile.Despite the past accomplishments of the founders and
early employees, Android Inc. operated secretly, revealing only that it was working on software
for mobile phones. That same year, Rubin ran out of money. Steve Perlman, a close friend of
Rubin, brought him $10,000 in cash in an envelope and refused a stake in the company.
In July 2005, Google acquired Android Inc. for at least $50 million, whose key
employees, including Rubin, Miner and White, stayed at the company after the acquisition. Not
much was known about Android Inc. at the time, but many assumed that Google was planning to
enter the mobile phone market with this move.
At Google, the team led by Rubin developed a mobile device platform powered by the
Linux kernel. Google marketed the platform to handset makers and carriers on the promise of
providing a flexible, upgradable system. Google had lined up a series of hardware component
and software partners and signaled to carriers that it was open to various degrees of cooperation
on their part.
Eric Schmidt, Andy Rubin and Hugo Barra at a 2012 press conference announcing
Google's Nexus 7 tablet
That day, Android was unveiled as its first product, a mobile device platform built on the
Linux kernel. The first commercially available smartphone running Android was the HTC
Dream, released on October 22, 2008.
Since 2008, Android has seen numerous updates which have incrementally improved the
operating system, adding new features and fixing bugs in previous releases. Each major release is
named in alphabetical order after a dessert or sugary treat; for example, version 1.5 "Cupcake"
was followed by 1.6 "Donut". In 2010, Google launched its Nexus series of devices – a line of
smartphones and tablets running the Android operating system, and built by manufacturing
partners. HTC collaborated with Google to release the first Nexus smartphone, the Nexus One.
Google has since updated the series with newer devices, such as the Nexus 5 phone
(made by LG) and the Nexus 7 tablet (made by Asus). Google releases the Nexus phones and
tablets to act as their flagship Android devices, demonstrating Android's latest software and
hardware features. From 2013 until 2015, Google offered several Google Play Edition devices
over Google Play. While not carrying the Google Nexus branding, these were Google-
customized Android phones and tablets that also ran the latest version of Android, free from
manufacturer or carrier modifications.
From 2010 to 2013, Hugo Barra served as product spokesperson, representing Android at
press conferences and Google I/O, Google’s annual developer-focused conference. Barra's
product involvement included the entire Android ecosystem of software and hardware, including
Honeycomb, Ice Cream Sandwich, Jelly Bean and KitKat operating system launches, the Nexus
4 and Nexus 5 smartphones, the Nexus 7 and Nexus 10 tablets, and other related products such
as Google Now and Google Voice Search, Google’s speech recognition product comparable to
Apple’s Siri. In 2013, Barra left the Android team for Chinese smartphone maker Xiaomi.
The same year, Larry Page announced in a blog post that Andy Rubin had moved from
the Android division to take on new projects at Google. He was replaced by Sundar Pichai who
became the new head of Android and Chrome OS, and, later, by Hiroshi Lockheimer when
Pichai became CEO of Google.
INTERFACE
Notifications are accessed by sliding from the top of the display; individual notifications
can be dismissed by sliding them away, and may contain additional functions as seen on this
example of the "missed call" notification from an older version of Android.
Android's default user interface is based on direct manipulation, using touch inputs, that
loosely correspond to real-world actions, like swiping, tapping, pinching, and reverse pinching to
manipulate on-screen objects, and a virtual keyboard. The response to user input is designed to
be immediate and provides a fluid touch interface, often using the vibration capabilities of the
device to provide haptic feedback to the user. Internal hardware such as accelerometers,
gyroscopes and proximity sensors are used by some applications to respond to additional user
actions, for example adjusting the screen from portrait to landscape depending on how the device
is oriented, or allowing the user to steer a vehicle in a racing game by rotating the device,
simulating control of a steering wheel.
Android devices boot to the homescreen, the primary navigation and information "hub"
on Android devices that is analogous to the desktop found on PCs (Android also runs on regular
PCs, as described below). Android homescreens are typically made up of app icons and widgets;
app icons launch the associated app, whereas widgets display live, auto-updating content such as
the weather forecast, the user's email inbox, or a news ticker directly on the homescreen. A
homescreen may be made up of several pages that the user can swipe back and forth between,
though Android's homescreen interface is heavily customisable, allowing the user to adjust the
look and feel of the device to their tastes.
Third-party apps available on Google Play and other app stores can extensively re-theme
the homescreen, and even mimic the look of other operating systems, such as Windows Phone.
Most manufacturers, and some wireless carriers, customise the look and feel of their Android
devices to differentiate themselves from their competitors. Applications that handle interactions
with the homescreen are called "launchers" because they, among other purposes, launch the
applications installed on a device.
Present along the top of the screen is a status bar, showing information about the device
and its connectivity. This status bar can be "pulled" down to reveal a notification screen where
apps display important information or updates, such as a newly received email or SMS text, in a
way that does not immediately interrupt or inconvenience the user. Notifications are persistent
until read (by tapping, which opens the relevant app) or dismissed by sliding it off the screen.
Beginning on Android 4.1, "expanded notifications" can display expanded details or additional
functionality; for instance, a music player can display playback controls, and a "missed call"
notification provides buttons for calling back or sending the caller an SMS message.
Android provides the ability to run applications which change the default launcher and
hence the appearance and externally visible behaviour of Android. These appearance changes
include a multi-page dock or no dock, and many more changes to fundamental features of the
user interface.
APPLICATIONS
Applications ("apps"), which extend the functionality of devices, are written using the
Android software development kit (SDK) and, often, the Java programming language that has
complete access to the Android APIs. Java may be combined with C/C++, together with a choice
of non-default runtimes that allow better C++ support; the Go programming language is also
supported since its version 1.4, which can also be used exclusively although with a restricted set
of Android APIs. The SDK includes a comprehensive set of development tools, including a
debugger, software libraries, a handset emulator based on QEMU, documentation, sample code,
and tutorials.
Due to the open nature of Android, a number of third-party application marketplaces also
exist for Android, either to provide a substitute for devices that are not allowed to ship with
Google Play Store, provide applications that cannot be offered on Google Play Store due to
policy violations, or for other reasons. Examples of these third-party stores have included the
Amazon Appstore, GetJar, and SlideMe. F-Droid, another alternative marketplace, seeks to only
provide applications that are distributed under free and open source licenses.
MEMORY MANAGEMENT
Android manages the applications stored in memory automatically: when memory is low,
the system will begin killing applications and processes that have been inactive for a while, in
reverse order since they were last used (oldest first). This process is designed to be invisible to
the user, so that users do not need to manage memory or the killing of applications themselves.
Lifehacker reported in 2011 that third-party task killers were doing more harm than good.
HARDWARE
The main hardware platform for Android is the ARM architecture (ARMv7 and ARMv8-
A architectures), with x86 and MIPS architectures also officially supported in later versions of
Android. Since Android 5.0 "Lollipop", 64-bit variants of all platforms are supported in addition
to the 32-bit variants. Unofficial Android-x86 project used to provide support for the x86 and
MIPS architectures ahead of the official support.[5] Since 2012, Android devices with Intel
processors began to appear, including phones and tablets. While gaining support for 64-bit
platforms, Android was first made to run on 64-bit x86 and then on ARM64.
Requirements for the minimum amount of RAM for devices running Android 5.1 range
from 512 MB of RAM for normal-density screens, to about 1.8 GB for high-density screens. The
recommendation for Android 4.4 is to have at least 512 MB of RAM, while for "low RAM"
devices 340 MB is the required minimum amount that does not include memory dedicated to
various hardware components such as the baseband processor.
Android 4.4 requires a 32-bit ARMv7, MIPS or x86 architecture processor (latter two
through unofficial ports),[5] together with an OpenGL ES 2.0 compatible graphics processing unit
(GPU). Android supports OpenGL ES 1.1, 2.0, 3.0 and 3.1. Some applications may explicitly
require a certain version of the OpenGL ES, and suitable GPU hardware is required to run such
applications.
Some other hardware was initially required, but those requirements have been relaxed or
eliminated altogether. For example, as Android was developed initially as a phone OS, hardware
such as microphones were required, while over time the phone function became optional.
Android used to require an autofocus camera, which was relaxed to a fixed-focus camera if
present at all, since the camera was dropped as a requirement entirely when Android started to be
used on set-top boxes.
In addition to running on smartphones and tablets, several vendors run Android natively
on regular PC hardware with a keyboard and mouse. In addition to their availability on
commercially available hardware, similar PC hardware–friendly versions of Android are freely
available from the Android-x86 project, including customized Android 4.4. Using the Android
emulator that is part of the Android SDK, or by using BlueStacks or Andy, Android can also run
non-natively on x86.
Chinese companies are building a PC and mobile operating system, based on Android, to
"compete directly with Microsoft Windows and Google Android". The Chinese Academy of
Engineering noted that "more than a dozen" companies were customising Android following a
Chinese ban on the use of Windows 8 on government PCs.
DEVELOPMENT
Android is developed in private by Google until the latest changes and updates are ready
to be released, at which point the source code is made available publicly. This source code will
only run without modification on select devices, usually the Nexus series of devices. The source
code is, in turn, adapted by OEMs to run on their hardware. Android's source code does not
contain the often proprietary device drivers that are needed for certain hardware components.
In 2007, the green Android logo was designed for Google by a graphic designer Irina
Blok. The design team was tasked with a project to create a universally identifiable icon with the
specific inclusion of a robot in the final design. After numerous design developments based on
science-fiction and space movies, the team eventually sought inspiration from the human symbol
on restroom doors and modified the figure into a robot shape. As Android is open-sourced, it was
agreed that the logo should be likewise, and since its launch the green logo has been
reinterpreted into countless variations on the original design.
BACK END
INTRODUCTON
DESIGN
Unlike client–server database management systems, the SQLite engine has no standalone
processes with which the application program communicates. Instead, the SQLite library is
linked in and thus becomes an integral part of the application program. The library can also be
called dynamically. Due to the server-less design, SQLite applications require fewer
[7]
configurations than client-server databases. SQLite is called zero-conf because it does not
require service management (such as startup scripts) or access control based on GRANT and
passwords.
Several computer processes or threads may access the same database concurrently.
Several read accesses can be satisfied in parallel. A write access can only be satisfied if no other
accesses are currently being serviced. Otherwise, the write access fails with an error code (or can
automatically be retried until a configurable timeout expires). This concurrent access situation
would change when dealing with temporary tables. This restriction is relaxed in version 3.7 when
write-ahead logging (WAL) is turned on enabling concurrent reads and writes.
SQLite version 3.7.4 first saw the addition of the FTS4(full text search) module, which
features enhancements over the older FTS3 module. FTS4 allows users to perform full text
searches on documents similar to how search engines search webpages. Version 3.8.2 added
support for creating tables without rowed, which may provide space and performance
improvements. Common table expressions support was added to SQLite in version 3.8.3. SQLite
with full Unicode function is optional.
3. SYSTEM ANALYSIS
Individual colleges post their events in their application so that end users/
students visit that application and gather information of particular event. Students
are required to visit more college application and then only the future events can be
found out. This is a tedious and decentralized approach to collect the data. The
student could not know the event details going to happen in another department. If
the student needs to participate in an event, they need to register their participation
through paper work. The college has not provided with the individual login to add
their college events.
Input data of a system may not be necessarily is raw data captured in the system from
scratch. These can also be the output of another system or subsystem. The design of input covers
all the phases of input from the creation of initial data to actual entering of the data to the system
for processing. The design of inputs involves identifying the data needed, specifying the
characteristics of each data item, capturing and preparing data fro computer processing and
ensuring correctness of data.
Any Ambiguity in input leads to a total fault in output. The goal of designing the input
data is to make data entry as easy and error free as possible.
This project includes following input forms in the server system.
Admin Login
This form contains input as username of an admin and password. Thèse détails are given
as input by using edit text control. These details are checked against admin table and the login
proceeds.
Staff Login
This form contains input as username of a staff and password. Thèse détails are given as
input by using edit text control. These details are checked against staff table and the login
proceeds.
Student Login
This form contains input as username of a student and password. Thèse détails are given
as input by using edit text control. These details are checked against staff table and the login
proceeds.
4.2 OUTPUT DESIGN
Output Design generally refers to the results and information’s that are generated
by the system for many end-users, output is the main reason for developing the system
and the basis on which they evaluate the usefulness of the application.
The objective of a system finds its shape in terms of the output. The analysis of
the objective of a system leads to determination of outputs. Outputs of a system can face
various forms. The most common are reports, screen displays, printed forms, graphical
drawings etc., The output can also be varied in terms of their contents frequency, timing
and format. The user of the output from a system are the justification for its existence. If
the output are inadequate in any way, the system are itself is adequate. The basic
requirements of output are that it should be accurate, timely and appropriate, in terms of
content, medium and layout for its intended purpose.
All the student event details are viewed using this report
View Attendance Details
All the student attendance details are viewed using this report
View Mark Details
All the student mark details are viewed using this report
4.3 DATABASE DESIGN
The most important consideration in designing the database is how information will be
used. The main objectives of designing a database are:
Data Integration
In a database, information from several files are coordinated, accessed and operated upon
as through it is in a single file. Logically, the information are centralized, physically, the data
may be located on different devices, connected through data communication facilities.
Data Integrity
Data integrity means storing all data in one place only and how each application to access
it. This approach results in more consistent information, one update being sufficient to achieve a
new record status for all applications, which use it. This leads to less data redundancy; data items
need not be duplicated; a reduction in the direct access storage requirement.
Data Independence
3 OrganizedDate DateTime 8
MODULE DESCRIPTION
ADMIN
LOGIN
In this module, the admin logins to the app using given username and password.
ADD STAFF
In this module, staff details such as id, name and other details are added along
with password.
VIEW STAFF
In this module, staff details such as id, name and other details are viewed along
with password.
VIEW EVENTS
In this module, event details such as id, date and location details are viewed along
with event manager.
STAFF
LOGIN
In this module, the staff logins to the app using given staff id and password.
EVENT ENTRY
In this module, event details such as id, date and location details are added along
with event manager.
VIEW EVENTS
In this module, event details such as id, date and location details are viewed along
with event manager.
VIEW FEEDBACKS (ABOUT STAFF)
In this module, feedback details such as id, date, student id, staff id, title and
description details are viewed.
STUDENT
LOGIN
In this module, the student logins to the app using given student id and password.
VIEW EVENTS
In this module, event details such as id, date and location details are viewed along
with event manager.
ADMIN
Admin
Login
Login
Staff
Staff
Login
Add Mark
Feebacks Attendance
Mark
STUDENT
Student
Student
Login
View Mark
Feedbacks Attendance
Mark
5. TESTING
TESTING
Testing is vital to the success of the system. System testing makes a logical assumption
that if all parts of the system are correct, the goal will be successfully achieved. In the testing
process we test the actual system in an organization and gather errors from the new system
operates in full efficiency as stated. System testing is the stage of implementation, which is
aimed to ensuring that the system works accurately and efficiently.
In the testing process we test the actual system in an organization and gather errors from
the new system and take initiatives to correct the same. All the front-end and back-end
connectivity are tested to be sure that the new system operates in full efficiency as stated. System
testing is the stage of implementation, which is aimed at ensuring that the system works
accurately and efficiently.
The main objective of testing is to uncover errors from the system. For the uncovering
process we have to give proper input data to the system. So we should have more conscious to
give input data. It is important to give correct inputs to efficient testing.
Testing is done for each module. After testing all the modules, the modules are integrated
and testing of the final system is done with the test data, specially designed to show that the
system will operate successfully in all its aspects conditions. Thus the system testing is a
confirmation that all is correct and an opportunity to show the user that the system works.
Inadequate testing or non-testing leads to errors that may appear few months later. This will
create two problems
Testing has to be done using the two common steps Unit testing and Integration testing. In
this project, the following testing are made:
5.1UNIT TESTING
Unit testing verification efforts on the smallest unit of software design, module. This is
known as “Module Testing”. The modules such as IP address input, web service accessing and
result consolidation are tested separately in this project. This testing is carried out during
programming stage itself. In these testing steps, each module is found to be working
satisfactorily as regard to the expected output from the module. Node IP Address addition and
task addition details is unit tested such that it is properly saved in database.
In the System development life cycle, the system implementation and maintenance will
be occurring after the completion of analysis and system design.
The implementation process begins with preparing a plan for the implementation of the
system. According to this plan, the activities are to be carried out in these plans; discussion has
been made regarding the equipment, resources and how to test activities. Thus a clear plan was
prepared for the activities.
The implementation phase is less creative then system design. It is primarily concerned
with,
1. User Training
2. Site preparation
USER TRAINING
An analyst of user training focus on two factors, user capabilities and the nature of the
system being installed. Users range from the naïve to the highly sophisticated. Development
research provides interesting insights into how naïve computer users think about their first
exposure to a new system.
SITE PREPARATION
The review team prepares a formal review plan around the objectives of review, the type
of evaluation to be carried out and the time schedule required.
TYPES OF IMPLEMENTATION
There are three types of implementation,
computer
During the final testing, user acceptance is tested followed by user training. Depending
on the nature of the system, extensive user training may be required. Conversion usually takes
place about the same time the user is being trained or later.
Create the folder with project name and bin, obj folders are copied into that project folder.
7. CONCLUSION
7.1 CONCLUSION
The application eliminates the manual communication difficulties currently faced by the
user. It is developed in a user-friendly manner since the application is developed using Android.
The application is very fast and any transaction can be process across the network. Error
messages are given at each level of input of individual stages.
Concurrently the application can be executed since the database is SQLite and capable of
processing more client connections. The database is required to be installed in server space only.
Only client drivers are required in client nodes before accessing the application.
//
t1=(EditText)findViewById(R.id.txtName);
t2=(EditText)findViewById(R.id.txtMobileNo);
b1=(Button)findViewById(R.id.btnSave);
b2=(Button)findViewById(R.id.btnBack);
mydb=openOrCreateDatabase(cls.dbname,MODE_PRIVATE ,null);
mydb.execSQL("Create Table If Not Exists AdminMobile(Name Varchar(20),MobileNo
Varchar(15))");
mydb.close();
//
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.admin_mobile_register, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
//
class myListener1 implements View.OnClickListener
{
@Override
public void onClick(View v) {
//TODO Auto-generated method stub
switch(v.getId())
{
case R.id.btnSave:
String s1=t1.getText().toString();
String s2=t2.getText().toString();
if(s1.equals(""))
{
t1.requestFocus();
return;
}
if (s2.toString().length()!=10 || cls.isNum(s2.toString())==false)
{
Toast.makeText(getApplicationContext(), "Must enter 10 digits & Numeric Values to Mobile
No. ", Toast.LENGTH_LONG).show();
t2.requestFocus();
return;
}
mydb=openOrCreateDatabase(cls.dbname,MODE_PRIVATE ,null);
//mydb.execSQL("Delete From AdminMobile Where MobileNo='" + s2 + "'");
mydb.execSQL("Delete From AdminMobile");
mydb.execSQL("Insert into AdminMobile Values('" + s1 + "','" + s2 + "')");
Toast.makeText(getApplicationContext(), "Admin Mobile Details Saved",
Toast.LENGTH_LONG).show();
mydb.close();
break;
case R.id.btnBack:
finish();
break;
}
}
}
//
}
View Admin
package com.example.getcurrentlocation;
import android.app.Activity;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.ViewGroup.LayoutParams;
import android.widget.ScrollView;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.Toast;
public class ViewAdminMobile extends Activity {
TableLayout tl1;
ScrollView sv;
SQLiteDatabase mydb=null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_admin_mobile);
try
{
tl1 = (TableLayout)findViewById(R.id.myTableLayout);
mydb=openOrCreateDatabase(cls.dbname,MODE_PRIVATE ,null);
Cursor c=null;
c=mydb.rawQuery("Select Name,MobileNo From AdminMobile",null);
c.moveToFirst();
TableRow tr1 = new TableRow(this);
TextView b11 = new TextView(this);
b11.setText("ADMIN MOBILE DETAILS");
tr1.addView(b11);
tl1.addView(tr1,new
TableLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
tr1.setBackgroundColor(Color.BLUE);
TableRow tr11 = new TableRow(this);
TextView b12 = new TextView(this);
b12.setText("Records List");
tr11.addView(b12);
tl1.addView(tr11,new
TableLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
tr11.setBackgroundColor(Color.GREEN);
TableRow trheader = new TableRow(this);
TextView bheader1 = new TextView(this);
TextView bheader2 = new TextView(this);
tl1.addView(trheader,new
TableLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
trheader.setBackgroundColor(Color.WHITE)
bheader1.setText("Name");
trheader.addView(bheader1);
bheader2.setText("MobileNo");
trheader.addView(bheader2);
int rowcount=0;
while (c.isAfterLast()==false)
{
TableRow tr = new TableRow(this);
tr.addView(b1);
tr.addView(b2);
tl1.addView(tr,new
TableLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
if(rowcount%2==0)
{
tr.setBackgroundColor(Color.BLUE);
b1.setTextColor(Color.WHITE);
b2.setTextColor(Color.WHITE);
}
else
{
tr.setBackgroundColor(Color.GREEN);
b1.setTextColor(Color.BLACK);
b2.setTextColor(Color.BLACK);
}
rowcount++;
c.moveToNext();
}
c.close();
mydb.close();
}
catch(Exception e)
{
Toast.makeText(getApplicationContext(), e.getMessage().toString(),1000).show();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.view_admin_mobile, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;}
return super.onOptionsItemSelected(item);
}}
8.2 SCREEN SHOTS
9. REFERENCES
TEXT BOOKS
2. Android Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides) 1st
Edition, Bill Phillips, Kindle Store.
3. Android Programming: Pushing the Limits, 1st Edition, Erik Hellman, Wiley.
WEB REFERENCES
1. http://www.android.com
2. https://eclipse.org
3.https://en.wikipedia.org/wiki/Android_%28operating_system%9
4. https://en.wikipedia.org/wiki/SQLite
5. http://www.tutorialpoints.com