Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6808369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:56:49+00:00 2026-05-26T19:56:49+00:00

I am making an android application in which i have five items in a

  • 0

I am making an android application in which i have five items in a list .On each item click data is coming from url and then i have stored the items in local database.Now i want to have delete button before each item so that user can delete the item acc to his choice.That is how to delete a specific value from database in android application.I have tried googling ,,tried some ways given,but that didnot worked

Can anyone guide me how to accomplish this task?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:56:50+00:00Added an answer on May 26, 2026 at 7:56 pm

    you need to remove the item from the position and then set the adapter again so that the list will be refreshed.

    listofitems.remove(tempPosition);
    
    setListAdapter(customAdapter );
    

    to remove from the database. use the position to get the id.

    c.moveToPosition(position);
             id= c.getInt(c.getColumnIndex("_id"));
    

    using the id you can delete

    myDataBase.delete(tablename, "_id=?", new String[] {Integer.toString(id)});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making an android application in which I have put 10 images and
I am developing an android application in which i have to parse the url
I am an android developer.I am making an application in which I have to
So I'm making this android application, that needs to read data from user-provided CSV
I am making a Client Server application for my Android phone. I have created
I was making an application which uses list for displaying the details of a
Im making a client application for my ZTE Blade Android phone, which receives a
I am making an application which takes a URL with. *.asp extension and we
I am making an application which Streams media from the Internet,it can be from
im making an android application which requires a user to register using a form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.