You are on page 1of 3

Experiment No.

9
PART A
(PART A: TO BE REFFERED BY STUDENTS)

A.1 Aim:
Back End Development Phase 3

A.2 Prerequisite:
Core java programming and basic knowledge of database

A.3 Outcome:
After successful completion of this experiment students will be able to
1. Create Database of an application using SQLite or MySQL database

A.4. Procedure:
Tasks:
a) Create database of your application or backend functionality
b) Paste the code of database
c) Save the document as EXP9_ your Roll no.

PART B
(PART B: TO BE COMPLETED BY STUDENTS)
(Students must submit the soft copy as per following segments within two hours of the
practical. The soft copy must be uploaded on the Blackboard or emailed to the concerned
lab in charge faculties at the end of the practical in case the there is no Black board access
available)
Roll No.N006, N009, N014
Name: Anmol Bagati, Akshat Bansal, Rishabh
Jain
Program:MBA TECH
Division:C
Semester:4
Batch :B1
Date of Experiment:
Date of Submission:
Grade :A-

B.1 Task to be done:


1) Paste Source code of .xml and .java files in this section along with output.
package com.gasm.college.remi;
import android.content.Context;
import android.database.Cursor;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import android.widget.CursorAdapter;
import android.widget.TextView;

public class NotesCursorAdaptor extends CursorAdapter{

public NotesCursorAdaptor(Context context, Cursor c, int flags) {


super(context, c, flags);
}
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
return LayoutInflater.from(context).inflate(
R.layout.note_list_item, parent, false
);
}
@Override
public void bindView(View view, Context context, Cursor cursor) {
String noteText =
cursor.getString(cursor.getColumnIndex(com.gasm.college.remi.DBOpenHelper.NOTE_TEXT))
;
int pos = noteText.indexOf(10);
if(pos != -1){
noteText = noteText.substring(0, pos) + " ...";
TextView tv = (TextView) view.findViewById(R.id.tvNote);
tv.setText(noteText);
}
else {
TextView tv = (TextView) view.findViewById(R.id.tvNote);
tv.setText(noteText);
}
}
}
B.3 Conclusion:

After successful completion of this experiment we are able to


1. Create Database of an application using SQLite or MySQL database

You might also like