Skip to main content

Android Sqlite and ListView Example

This is simple application which insert data into Sqlite database --and shows the data  from the database in a ListView
ListView is not used in android Anymore. We use RecyclerView and CardView  in Android
  • RecyclerView Demo is available on the following link
http://androidtuts4u.blogspot.in/2017/04/android-recyclerview-example.html
  • RecyclerView with CardView Demo is available on the following link
http://androidtuts4u.blogspot.in/2017/09/android-card-view-example.html


This  is the first Activity of application which shows data from database in listview. Register here buton will start a Registration Activity.





Submit button will add data to database and show it in the ListView of MainActivity. Update can be performed by clicking ListView items.


   
you can download the source code of this project from  google drive  https://drive.google.com/folderview?id=0BySLpWhqmbbdS0dtT1R2TXdBWEE&usp=sharing
click on the above link ->sign into  your  google account ->add this to your google drive -> open it in google drive and download it.

To create this Simpl application do the following:-


    1. Create a class which extends  SQLiteOpenHelper the class is given below


package com.arun.registrationform;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class RegistrationOpenHelper extends SQLiteOpenHelper {
 public static final String DATABASE_NAME = "REGISTRATION_DB";
 public static final String TABLE_NAME = "REGISTRATION_TABLE";
 public static final int VERSION = 1;
 public static final String KEY_ID = "_id";
 public static final String FNAME = "F_NAME";
 public static final String LNAME = "L_NAME";
 public static final String SCRIPT = "create table " + TABLE_NAME + " ("
   + KEY_ID + " integer primary key autoincrement, " + FNAME
   + " text not null, " + LNAME + " text not null );";

 public RegistrationOpenHelper(Context context, String name,
   CursorFactory factory, int version) {
  super(context, name, factory, version);
  // TODO Auto-generated constructor stub
 }

 @Override
 public void onCreate(SQLiteDatabase db) {
  // TODO Auto-generated method stub
  db.execSQL(SCRIPT);
 }

 @Override
 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
  // TODO Auto-generated method stub
  db.execSQL("drop table " + TABLE_NAME);
  onCreate(db);
 }

}




2.create another class for writing all the Sqlite functions the class is given below 

package com.arun.registrationform;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class RegistrationAdapter {
 SQLiteDatabase database_ob;
 RegistrationOpenHelper openHelper_ob;
 Context context;

 public RegistrationAdapter(Context c) {
  context = c;
 }

 public RegistrationAdapter opnToRead() {
  openHelper_ob = new RegistrationOpenHelper(context,
    openHelper_ob.DATABASE_NAME, null, openHelper_ob.VERSION);
  database_ob = openHelper_ob.getReadableDatabase();
  return this;

 }

 public RegistrationAdapter opnToWrite() {
  openHelper_ob = new RegistrationOpenHelper(context,
    openHelper_ob.DATABASE_NAME, null, openHelper_ob.VERSION);
  database_ob = openHelper_ob.getWritableDatabase();
  return this;

 }

 public void Close() {
  database_ob.close();
 }

 public long insertDetails(String fname, String lname) {
  ContentValues contentValues = new ContentValues();
  contentValues.put(openHelper_ob.FNAME, fname);
  contentValues.put(openHelper_ob.LNAME, lname);
  opnToWrite();
  long val = database_ob.insert(openHelper_ob.TABLE_NAME, null,
    contentValues);
  Close();
  return val;

 }

 public Cursor queryName() {
  String[] cols = { openHelper_ob.KEY_ID, openHelper_ob.FNAME,
    openHelper_ob.LNAME };
  opnToWrite();
  Cursor c = database_ob.query(openHelper_ob.TABLE_NAME, cols, null,
    null, null, null, null);

  return c;

 }

 public Cursor queryAll(int nameId) {
  String[] cols = { openHelper_ob.KEY_ID, openHelper_ob.FNAME,
    openHelper_ob.LNAME };
  opnToWrite();
  Cursor c = database_ob.query(openHelper_ob.TABLE_NAME, cols,
    openHelper_ob.KEY_ID + "=" + nameId, null, null, null, null);

  return c;

 }

 public long updateldetail(int rowId, String fname, String lname) {
  ContentValues contentValues = new ContentValues();
  contentValues.put(openHelper_ob.FNAME, fname);
  contentValues.put(openHelper_ob.LNAME, lname);
  opnToWrite();
  long val = database_ob.update(openHelper_ob.TABLE_NAME, contentValues,
    openHelper_ob.KEY_ID + "=" + rowId, null);
  Close();
  return val;
 }

 public int deletOneRecord(int rowId) {
  // TODO Auto-generated method stub
  opnToWrite();
  int val = database_ob.delete(openHelper_ob.TABLE_NAME,
    openHelper_ob.KEY_ID + "=" + rowId, null);
  Close();
  return val;
 }

}

3.Then creae MainActivty and main.xml which shows the values from database in a listView.
 This is MainActivity.java



package com.arun.registrationform;

import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.support.v4.widget.SimpleCursorAdapter;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ListView;

public class MainActivity extends Activity {
 RegistrationAdapter adapter_ob;
 RegistrationOpenHelper helper_ob;
 SQLiteDatabase db_ob;
 ListView nameList;
 Button registerBtn;
 Cursor cursor;

 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  nameList = (ListView) findViewById(R.id.lv_name);
  registerBtn = (Button) findViewById(R.id.btn_register);
  adapter_ob = new RegistrationAdapter(this);

  String[] from = { helper_ob.FNAME, helper_ob.LNAME };
  int[] to = { R.id.tv_fname, R.id.tv_lname };
  cursor = adapter_ob.queryName();
  SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(this,
    R.layout.row, cursor, from, to);
  nameList.setAdapter(cursorAdapter);
  nameList.setOnItemClickListener(new OnItemClickListener() {

   @Override
   public void onItemClick(AdapterView arg0, View arg1, int arg2,
     long arg3) {
    // TODO Auto-generated method stub
    Bundle passdata = new Bundle();
    Cursor listCursor = (Cursor) arg0.getItemAtPosition(arg2);
    int nameId = listCursor.getInt(listCursor
      .getColumnIndex(helper_ob.KEY_ID));
    // Toast.makeText(getApplicationContext(),
    // Integer.toString(nameId), 500).show();
    passdata.putInt("keyid", nameId);
    Intent passIntent = new Intent(MainActivity.this,
      EditActivity.class);
    passIntent.putExtras(passdata);
    startActivity(passIntent);
   }
  });
  registerBtn.setOnClickListener(new OnClickListener() {

   @Override
   public void onClick(View arg0) {
    // TODO Auto-generated method stub
    Intent registerIntent = new Intent(MainActivity.this,
      RegistrationActivity.class);
    startActivity(registerIntent);
   }
  });

 }

 @Override
 public void onResume() {
  super.onResume();
  cursor.requery();

 }

}



Main.xml is given below


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <ListView
        android:id="@+id/lv_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >
    </ListView>

    <Button
        android:id="@+id/btn_register"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/register" />

</LinearLayout>

-->> for listView we need another layout t ospecify each Row of the LIstView
which is row.xml given below


<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:layout_width="match_parent"

    android:layout_height="wrap_content"

    android:orientation="horizontal" >



    <TextView

        android:id="@+id/tv_fname"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content" />



    <TextView

        android:id="@+id/tv_lname"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_marginLeft="20dp" />



</LinearLayout>


4.To inserting data  into database RegistrationActivity.java  and register.xml is used which is given below


RegistrationActivity.java

package com.arun.registrationform;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class RegistrationActivity extends Activity {
 RegistrationAdapter adapter;
 RegistrationOpenHelper helper;
 EditText fnameEdit, lnameEdit;
 Button submitBtn, resetBtn;

 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.register);
  fnameEdit = (EditText) findViewById(R.id.et_fname);
  lnameEdit = (EditText) findViewById(R.id.et_lname);
  submitBtn = (Button) findViewById(R.id.btn_submit);
  resetBtn = (Button) findViewById(R.id.btn_reset);
  adapter = new RegistrationAdapter(this);

  submitBtn.setOnClickListener(new OnClickListener() {

   @Override
   public void onClick(View arg0) {
    // TODO Auto-generated method stub
    String fnameValue = fnameEdit.getText().toString();
    String lnameValue = lnameEdit.getText().toString();
    long val = adapter.insertDetails(fnameValue, lnameValue);
    // Toast.makeText(getApplicationContext(), Long.toString(val),
    // 300).show();
    finish();
   }
  });
  resetBtn.setOnClickListener(new OnClickListener() {

   @Override
   public void onClick(View v) {
    // TODO Auto-generated method stub
    fnameEdit.setText("");
    lnameEdit.setText("");
   }
  });

 }
}



register.xml 


<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="fill_parent"

    android:layout_height="fill_parent"

    android:stretchColumns="1" >



    <TableRow

        android:layout_width="fill_parent"

        android:layout_height="wrap_content" >



        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="@string/fname" />



        <EditText

            android:id="@+id/et_fname"

            android:layout_width="fill_parent"

            android:layout_height="wrap_content" />

    </TableRow>



    <TableRow

        android:layout_width="wrap_content"

        android:layout_height="wrap_content" >



        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="@string/lname" />



        <EditText

            android:id="@+id/et_lname"

            android:layout_width="fill_parent"

            android:layout_height="wrap_content" />

    </TableRow>



    <TableRow

        android:layout_width="wrap_content"

        android:layout_height="wrap_content" >



        <Button

            android:id="@+id/btn_submit"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="@string/submit" />



        <Button

            android:id="@+id/btn_reset"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="@string/reset" />

    </TableRow>



</TableLayout>

5.For updating Database values EditActivity.java is used

 package com.arun.registrationform;

import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class EditActivity extends Activity {
 RegistrationAdapter regadapter;
 RegistrationOpenHelper openHelper;
 int rowId;
 Cursor c;
 String fNameValue, lNameValue;
 EditText fname, lname;
 Button editSubmit, btnDelete;

 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.editregister);
  fname = (EditText) findViewById(R.id.et_editfname);
  lname = (EditText) findViewById(R.id.et_editlname);
  editSubmit = (Button) findViewById(R.id.btn_update);
  btnDelete = (Button) findViewById(R.id.btn_delete);

  Bundle showData = getIntent().getExtras();
  rowId = showData.getInt("keyid");
  // Toast.makeText(getApplicationContext(), Integer.toString(rowId),
  // 500).show();
  regadapter = new RegistrationAdapter(this);

  c = regadapter.queryAll(rowId);

  if (c.moveToFirst()) {
   do {
    fname.setText(c.getString(1));
    lname.setText(c.getString(2));

   } while (c.moveToNext());
  }

  editSubmit.setOnClickListener(new OnClickListener() {

   @Override
   public void onClick(View arg0) {
    // TODO Auto-generated method stub
    regadapter.updateldetail(rowId, fname.getText().toString(),
      lname.getText().toString());
    finish();
   }
  });
  btnDelete.setOnClickListener(new OnClickListener() {

   @Override
   public void onClick(View v) {
    // TODO Auto-generated method stub
    regadapter.deletOneRecord(rowId);
    finish();
   }
  });
 }
}

editregister.xml is given below

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <TableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:stretchColumns="1" >

        <TableRow
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/fname" />

            <EditText
                android:id="@+id/et_editfname"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" >

                <requestFocus />
            </EditText>
        </TableRow>

        <TableRow
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/fname" />

            <EditText
                android:id="@+id/et_editlname"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />
        </TableRow>
    </TableLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <Button
            android:id="@+id/btn_update"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="update" />

        <Button
            android:id="@+id/btn_delete"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Delete" />
    </LinearLayout>

</LinearLayout>




Comments

  1. Thank you. It saved my life.. XD

    ReplyDelete
    Replies
    1. Can i get source code of this.
      ranjan.aashish12@gmail.com
      Thanks

      Delete
    2. please send the source code to my mail....

      Chaituu599@gmail.com

      tanQ

      Delete
    3. hey can i send me the source code.
      pbhati42@gmail.com

      Delete
    4. no u can't send urself a source code ....lol

      Delete
    5. thanks so much, please could you give me the zip file of the source code.. ?

      sachin.rana42@gmail.com

      Delete
  2. thaaaaaanks so much, please could you give me the zip file of the source code.. ?

    sara.alhrbi@gmail.com


    thanks in advance

    ReplyDelete
    Replies
    1. please check your mail ....

      Delete
    2. please can you send to me complete package in zip file in my email amanishaabani@gmail.com

      Delete
    3. This comment has been removed by the author.

      Delete
    4. Hey its a very nice and very much helpful to me, can you please send me a zip file to my id,

      suthar.rajesh2687@gmail.com

      Delete
    5. hello can u plz snd me the zip file on jenareshmeebye@hotmail.com ..thnks

      Delete
  3. Thank you very much. Really helpful to me. can u give me the source file of this project.

    amila4d@gmail.com

    Thank you.

    ReplyDelete
  4. Really helpful to me. can u give me the source file of this project.

    aquariuskm@gmail.com

    Thank you.

    ReplyDelete
  5. very helpful... can u please mail me source code of this project.
    saini.deepu26@gmail.com

    thank you so much

    ReplyDelete
  6. this project help me a lot,
    thank you for your work...

    ReplyDelete
  7. Thanks for sharing

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Can I get the source code too ? kavita.kamesh@gmail.com

    ReplyDelete
    Replies
    1. The strings.xml file is missing here. Can you send me the complete project at kavita.kamesh@gmail.com ? Thanks

      Delete
    2. hey if you have the source code, could u send me 2

      orhankanat89@gmail.com

      Delete
    3. Please send me zip file of this code email muleb777@gmail.com

      Delete
  10. please can i get the source code too thanks in advance. nikalldway@gmail.com

    ReplyDelete
  11. Thank you so much.....This is really useful (y) :D

    ReplyDelete
  12. can you please send me the complete source code
    naim.imami@gmail.com

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete
  14. hi arun ,
    Thankyou very much for giving your time to mail me the source code . U doing a gr8 job as hardly any one would take his time out to send his code to sme1 whome he does not know ,...thanks again
    Nikhil

    ReplyDelete
  15. Can I get the source code too ?
    shinigamiboy777@gmail.com

    ReplyDelete
  16. Can i get source code of it..its very nice project..
    Email-ID = ppv.vishal@gmail.com

    ReplyDelete
  17. Nice work.
    Can u send me the source code?

    Thank u very much!

    iryna.raicu@gmail.com

    ReplyDelete
  18. thank you very much. Could you please send me the source code.

    ReplyDelete
  19. Hi sorry but this is a matter of urgency for a final year project? could someone please email me this source code - when i typed it - it wouldnt work.... seriously need help to create a small SQL database

    email address niall_mcguigan@hotmail.com

    ReplyDelete
  20. Hey Really would be great to have the source code

    i couldnt manage the codes :S

    orhankanat89@gmail.com

    ReplyDelete
  21. thank you for the tutorial. but, can u give me the source code. here my email.

    nadiahdaud@yahoo.com

    thankss(:

    ReplyDelete
  22. hello very nice post can u mail me plzzzz

    k.rajesh966@gmail.com

    ReplyDelete
  23. this is so helpful. thnx. could u email the source code. azza.gjon21@gmail.com. thnx a lot. :)

    ReplyDelete
  24. can you please send me the complete source code..

    xboyz017@gmail.com

    ReplyDelete
  25. I would like the complete source code, too.

    Thank you in advance.
    lagojohn3011@gmail.com

    ReplyDelete
  26. good one.
    pls send me zip file on virampurohit@gmail.com

    ReplyDelete
  27. can you please send me the complete source code as i have project to do within a week and i would much appreciated.
    alankhad@gmail.com

    ReplyDelete
  28. nice dude i like it........
    please could you give me the zip file of the source code.. ?
    juber.android@gmail.com

    ReplyDelete
  29. good one.
    pls send me zip file on alphactc@gmail.com

    Bijoy

    ReplyDelete
  30. Excellent Tutorial!
    Can you also please send me the source code to greggp1987@hotmail.com

    ReplyDelete
  31. can u send the source code need it urgently

    ReplyDelete
  32. This comment has been removed by the author.

    ReplyDelete
  33. hello, great tutorial! would be great if you could send the source code to me as well, thank you in advance :)

    ReplyDelete
  34. Great tutorial ,
    Please can i have the source code
    here is my email :
    georges.j.adam@hotmail.com

    I need it urgently :)

    ReplyDelete
  35. Good one!
    Thanks for the tutorial.

    ReplyDelete
  36. Plz mail me source code......to .....mail2lakshman143@gmail.com

    Thank you in advance

    ReplyDelete
  37. This comment has been removed by the author.

    ReplyDelete
  38. The example is so simple to understand and wonderful arun...But i have one query, When i add new record, at a time if i put both edittext blank and submit it. the blank record is saved and it is display as blank in listview. So my question is, "How to prevent to get null record when i click on submit button And also when edit the current record?"

    ReplyDelete
  39. it is a very helpful tutorial. can u send me the source code please.
    my id : zee_nom@yahoo.com

    ReplyDelete
  40. Thanks for the tutorial. Please send me your soure code to mail: tvanluu1990@gmail.com

    ReplyDelete
  41. i just try this one and have lot of error on listing program,,, can i get the source code email me to : goinspiration90@gmail.com

    thankyou before

    ReplyDelete
  42. It helped me alot. Thank you. Could you send me the source code please?
    my id : kingstamp@naver.com

    Thank you again.:)

    ReplyDelete
  43. Really helpful to me. can u give me the source file of this project.

    phat.maitan@gmail.com

    Thank you.

    ReplyDelete
  44. thaaaaaanks so much, please could you give me the zip file of the source code.. ?

    aln799a@hotmail.com

    ReplyDelete
  45. Thanks...

    Please can u send me the code?

    ReplyDelete
  46. Can you send me the source code? erhan5229@gmail.com

    ReplyDelete
  47. plz cn u snd me zip.
    suresh.jai137@gmail.com

    Regards
    suresh

    ReplyDelete
  48. HI Arun Can u send me the source code
    My Id:vadlaraghunandan@gmail.com.
    Thanks in advance.

    ReplyDelete
  49. Thanks...

    Please can u send me the code?

    mr.barkouka@gmail.com

    ReplyDelete
  50. please email the zip code to shalindrar@gmail.com

    ReplyDelete
  51. could you send me the code too?

    nitzan2611@gmail.com

    thanks!

    ReplyDelete
  52. Hi, could you send me the code? This will be bery important for me.
    ricardomiranda180775@gmail.com
    Thank you a lot.
    Ricardo Miranda

    ReplyDelete
  53. can u please send the source code of this to darshan.katari@gmail.com

    ReplyDelete
  54. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Por favor me prodrias enviar el Código fuente de Este tutorial a este email qry25live@gmail.com Te antemano Muchas gracia ...

      Delete
  55. Graaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaatest help

    May I have Source Code in Zip please

    Hafiz.Chauhan@yahoo.com

    ReplyDelete
  56. Hey its a very nice and very much helpful to me, can you please send me a zip file to my id,

    suthar.rajesh2687@gmail.com

    ReplyDelete
  57. Thank you very much. Really helpful to me. can u give me the source file of this project.

    anitha.n2211@gmail.com

    ReplyDelete
  58. thank you for this example. send me source code please.
    antonanton08@gmail.com

    ReplyDelete
  59. Thank you indeed!! Could you possibly send me source code?
    livefriendie@gmail.com

    ReplyDelete
  60. Can You please provide source code of it..
    manish.burade89@gmail.com

    ReplyDelete
  61. Can you please share source code of it akash.karrii@gmail.com

    ReplyDelete
  62. Thank you so much!! Could you possibly send me source code?
    jedypunk@hotmail.com this is great...

    ReplyDelete
  63. Could you please send me the source code?

    giraffe234623@gmail.com

    ReplyDelete
  64. plz send me this Source code.......

    rjkarmaker@gmail.com

    ReplyDelete
  65. could you please send me the zip file of this project....
    getanoopwayanad@gmail.com

    ReplyDelete
  66. thank.please sent full project in my mail.


    shohel925@gmail.com

    ReplyDelete
  67. Thank you so much for this!

    Can you please send the source files to me aswell!

    gillaninc@gmail.com

    ReplyDelete
  68. hi can u pls send the source file in zip folder.... pls
    mail id : makstufftechnologies@gmail.com

    ReplyDelete
  69. Hi can u send the full source code in my mail : hnadim4@gmail.com

    Thank you in advance

    ReplyDelete
  70. hi i need help pls send me source code, thns now

    dorukatak@gmail.com

    ReplyDelete
  71. Hi,do you know why the setOnItemClickListener didn't fire?

    ReplyDelete
  72. Hi can u send me the full source code in my mail : kavicoolzone@gmail.com

    Thank you in advance

    ReplyDelete
  73. Hi can you please save my life by sending me the source code in the address below carloune1@gmail.com
    thx in advanced

    ReplyDelete
  74. hi can you send me source code m.pizner@gmail.com
    thank you

    ReplyDelete
  75. Hey Can you please attach project zip here.

    ReplyDelete
  76. Hi , can you send me sourecode vukynamkhtn@gmail.com . thanks very much !

    ReplyDelete
  77. hey can u send me the zip code @ my ID
    prajeshgohil@gmail.com...plz thanx a lot.................................

    ReplyDelete
  78. Can you please send me zip file of the code?
    my id is sender983@gmail.com.
    thanks

    ReplyDelete
  79. Can you please send me zip file of the code?
    my id is snita.rayamajhi@gmail.com.
    thanks

    ReplyDelete
  80. Can you please send me zip file of the code?
    my id is maricarsanoy@gmail.com thank you and GODBLESS u ;)

    ReplyDelete
  81. Hi could you send me the source code to matbrookes67@gmail.com
    Thanks appreciated !!

    ReplyDelete
  82. thanks so much, please could you give me the zip file of the source code ?

    azwardy1990@gmail.com

    I need it urgently :)

    ReplyDelete
  83. would u give the source code, please.
    al.noman.uap@gmaill.com

    ReplyDelete
  84. Hi could you send me the source code
    Thanks !

    ReplyDelete
  85. Hello
    Great tuto. Maybe you should add the code for the manifest.
    If you can send me too the zip, I will appreciate.
    Thank you
    stephane-alger@orange.fr

    ReplyDelete
  86. Hi, Thanks for the good tutorial. Can you please send the source code to shyam.juluru@gmail.com.

    Thanks in advance.

    Shyam

    ReplyDelete
  87. Hi Could you send the full zip file??
    Thanks in Advance
    yewrajesh@ymail.com

    ReplyDelete
  88. Source code plz at

    princeasif1104@gmail.com

    ReplyDelete
  89. hey can you send me the whole code? thanks in advance.
    ruben_pavao@hotmail.com

    ReplyDelete
  90. Really great app!
    I would really appreciate if you could send me the source code :)
    megalozwo@outlook.com

    ReplyDelete
  91. Send me the source code plzzz mandar.pawar27@gmail.com

    ReplyDelete
  92. This comment has been removed by the author.

    ReplyDelete
  93. Please send me a source code on dheerajmarda@gmail.com !!!

    Thanks in advance .
    Take Care

    ReplyDelete
  94. thanks a lot for putting this up...
    could you please send me the source code?
    samuelkoshie@gmail.com

    Thanks a ton!!

    ReplyDelete
  95. hello thanks for this tutorial, may you send the source code please?
    mekni.ramos08@gmail.com

    ReplyDelete
  96. can you plz send the source code.. ashifa.harini@gmail.com

    ReplyDelete
  97. could u please send me the source code? pls......
    praba.star007@gmail.com

    ReplyDelete
  98. Could I have the sourcecode please :)
    scubalama@gmail.com

    ReplyDelete
  99. could u please send me the source code
    diogolopeseos@gmail.com

    ReplyDelete
  100. could u please send me the source code
    Thank you very much.
    draganastek68@gmail.com

    ReplyDelete
  101. This comment has been removed by the author.

    ReplyDelete
  102. could u please send me the source code
    rizmeb@gmail.com

    ReplyDelete
  103. Can you please send me zip file of the code?
    my id is pacocable@hotmail.com
    Thanks you very much

    ReplyDelete
  104. Can you give me this code>

    ReplyDelete
    Replies
    1. this is my email
      bryan_cruz321@yahoo.com
      thanks

      Delete
  105. please sent me the source code
    this is my mailid killivino@gmai.com

    ReplyDelete
  106. could u please send me the source code
    Thank you very much.
    arief.ilkom@gmail.com

    ReplyDelete
  107. Pls send me the source code
    sheshikanth.s@gmail.com

    ReplyDelete
  108. This comment has been removed by the author.

    ReplyDelete
  109. Add this code to your manifest or else exception will occur

    < activity android:name="com.example.sqlitepluslistview.RegistrationActivity" >< /activity >
    < activity android:name="com.example.sqlitepluslistview.EditActivity" >< /activity >

    ReplyDelete
  110. could you please send me the source code for this it seems to be helpful for me

    mail id:manikrishna.kurra@gmail.com

    thanks in advance

    ReplyDelete
  111. hey plz mail me whole project...sravanipractice@gmail.com
    thanx

    ReplyDelete
  112. can i get the source code in zip file
    to this id
    smart4android4@gmail.com
    thank u

    ReplyDelete
  113. Can you please share the complete project zip file to srinukulkarni@gmail.com.
    Many Thanks :)

    ReplyDelete
  114. thanks,it's very helpful, can you mail me the zip code of this example
    tahira.rana@yahoo.com

    ReplyDelete
  115. Its very helpful for my project can you mail me the zip code of this example jendeil11@gmail.com

    ReplyDelete
  116. please can i get the source code too thanks in advance,
    id:shitole.sandip@gmail.com

    ReplyDelete
  117. Great example. Please could you send me the source code.

    id: craigscopy@gmail.com

    ReplyDelete
  118. Hi can u send the full source code in my mail : sharmaabhilasha33@gmail.com

    Thank you in advance

    ReplyDelete
  119. Great example. Please could you send me the source code.

    id: saratencreddy@gmail.com

    ReplyDelete
  120. pls send me source code.....

    manojjadhav2191@gmail.com

    ReplyDelete
  121. I am using SOAP web services calling Soap method GetVehicle and showing it in Textview as an Json array then Save the data in Sqlite database Table Vehicle , now I want to populate Name column of the Vehicle table from SQLite database into ListView.
    I have searched a lot of examples but all are showin an user defined array items in listview, but not any example which is using Name column of Table from sqlite into ListView.

    Plz do help me by contributing in my code or any sample code r examples.

    ReplyDelete
  122. Pls send me the source code :nakuludu123@gmail.com

    ReplyDelete
  123. Thanks for helpful tutorial.

    Please send me source code.

    omarfaruk334@gmail.com

    ReplyDelete
  124. muchas gracias lo estaba buscando hace mucho tiempo :) :) :)

    ReplyDelete
  125. please send source code to my id: ffazzin@gmail.com

    ReplyDelete
  126. What is the app used to develop this?

    ReplyDelete
  127. plz mail d src code on ujwala1710@gmail.com, thnx.

    ReplyDelete
  128. pls send d souce code to sudhakar120693@gmail.com

    ReplyDelete
  129. Its awesome...can u please send me the source code...it will be very useful for me
    varun.praveen16@gmail.com
    Thanks in advance

    ReplyDelete
  130. Hey can you please send me the source code to my emai otin666@gmail thank you!!

    ReplyDelete
  131. This comment has been removed by the author.

    ReplyDelete
  132. This comment has been removed by the author.

    ReplyDelete
  133. i want to add another value. how can i add it

    ReplyDelete
  134. Please can i get the source code?
    tishajoshi83@gmail.com

    ReplyDelete
  135. Thank u very much
    https://www.facebook.com/puzel

    ReplyDelete
  136. hii,plz give me soure code of listview with sqlite in which ADD,DELETE all operations performes..
    thanks in advance

    ReplyDelete
  137. This comment has been removed by the author.

    ReplyDelete
  138. Can I have the source code please? Thanks in advance!
    Mail it to me at preetanjali08@gmail.com

    ReplyDelete
  139. Great tutorial ,
    Please can i have the source code
    here is my email :
    rahmiputri12@gmail.com

    I need it urgently :)

    ReplyDelete
  140. Great tutorial ,
    Please can i have the source code
    here is my email :
    rahmiputri12@gmail.com

    I need it urgently :)

    ReplyDelete
  141. Can you please send source code?
    my mail id is purushnareshcse510@gmail.com

    ReplyDelete
  142. Great tutorials. Pls send me your source code. stealthsolarenergy@gmail.com

    Thanks.

    ReplyDelete
  143. i need zip file of source code pls mail me is,,thanks,
    deepali.bajare26@gmail.com

    ReplyDelete
  144. i want to how to get data from database in next activity... plz guide me
    rohitjain516@gmail.com

    ReplyDelete
  145. This comment has been removed by the author.

    ReplyDelete
  146. can you send me the source code please for my thesis thank you a lot ^_^

    ReplyDelete
  147. i got an error to all string in all xmls how i resolve this ? thanks for reply BTW your source code, i can't open it i think the files is
    inadequate.

    ReplyDelete
  148. can you send me the source code please for my thesis thank you a lot ^_^

    i got so many errors ehh. :(

    aranetarjay@yahoo.com.ph thank you po ^_^

    ReplyDelete
  149. give me the source code pls my mail id is lawaniyatarun@gmail.com

    ReplyDelete
  150. watch Simple SQLite CRUD Operation in Android.
    http://blog.e-logicsense.com/android-sqlite-database-crud-operation

    ReplyDelete
  151. watch SQLite Database CRUD Operation in Android
    http://blog.e-logicsense.com/android-sqlite-database-crud-operation/

    ReplyDelete
  152. watch creating one databse for student record creating a table named studentrecord.
    http://blog.e-logicsense.com/android-sqlite-database-crud-operation/

    ReplyDelete
  153. Sir, i had tried the same code for demo, while running it gets automatically stop. Help me please...I am new to android. Thanks in advance.

    ReplyDelete
  154. Can you please send source code?
    sutharbhanwar96@gmaill.com

    ReplyDelete
  155. hi can you send me source code anisbegitu@gmail.com
    thank you

    ReplyDelete
  156. please can you give mee source code of this tutorial
    jennychristian@outlook.com

    ReplyDelete

Post a Comment

Popular posts

Android Card View And RecyclerView Example

CardView Cardview lets you show information inside cards that have consistent look across the platform . CardView is introduced with material design through support v7 library. CardView extends frame layout and It can have shadows and round corners.     Cards can be used as independent views that serves as an entry point to more detailed information. CardView can also  be used with RecyclerView to display cards as list. In this example we are using Cardview with Recyclerview to show data as list of cards. Our Demo application contains vertical list of cards . Each card contain Movie name, movie poster and director name. screenshot of demo app 1. CardView and RecyclerView are supportV7 library widget . so we need to add dependency for both in app level build.gradle file . which is in the app folder compile 'com.android.support:cardview-v7:26.+' compile 'com.android.support:recyclerview-v7:26.+' build.gradle file is apply plugin: 'com.android.applicat

Android RecyclerView Example

RecyclerView RecyclerView is the advanced version of Listview . It has more flexibility than ListView . RecyclerView is Compatible with Api level 7 onward . We need an adpater class and layout manager for creating Recyclerview.  RecyclerView has 3 built in layout managers LinearlayoutManager - this shows items in vertical or horizontal list GridLayoutManger - this shows item in a grid StaggeredGridLayout Manager - this shows item in a staggered grid we can also create custom layout mangers by extending RecyclerView.LayoutManager class RecyclerView does not have a divider to separate ts iitems . if we want divider we need to extend ItemDecoration class to display the divider RecyclerView also does not have an onItemClickListener for onClick events so we need a class extending RecyclerView.OnItemTouchListener for onclick events or we can use onlick listener in our adapter class we use LinearLayoutManager and a custom Adapter class in this example . This Demo app does no