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 9146813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:50:09+00:00 2026-06-17T10:50:09+00:00

I am currently unable to view newly inserted sqlite data from my ListView without

  • 0

I am currently unable to view newly inserted sqlite data from my ListView without restarting my whole application. Currently when a ListView item is selected, a new activity starts showing detailed information. once the detailed info is updated, edited, or the item is deleted the ListView is shown again but contain all original data unless app it closed and restarted. list view OnResume method is below. How do I refresh ListView when ever it is shown on screen. my attempts on adding .notifyDataSetChanged was unsuccessful. Not sure I implemented it correctly.

    public List<String> populateList (){

List<String> webNameList = new ArrayList<String>();

dataStore openHelperClass = new dataStore (this);

SQLiteDatabase sqliteDatabase = openHelperClass.getReadableDatabase();

Cursor cursor = sqliteDatabase.query(dataStore.TABLE_NAME_INFOTABLE, null, null, null,  null, null, dataStore.COLUMN_NAME_SITE, null);

startManagingCursor(cursor);

while (cursor.moveToNext()){

String sName = cursor.getString(cursor.getColumnIndex(dataStore.COLUMN_NAME_SITE));
String wUrl = cursor.getString(cursor.getColumnIndex(dataStore.COLUMN_NAME_ADDRESS));
String uName = cursor.getString(cursor.getColumnIndex(dataStore.COLUMN_NAME_USERNAME));
String pWord = cursor.getString(cursor.getColumnIndex(dataStore.COLUMN_NAME_PASSWORD));
String lNotes = cursor.getString(cursor.getColumnIndex(dataStore.COLUMN_NAME_NOTES));

LoginDetails lpDetails = new LoginDetails();

    lpDetails.setsName(sName);
    lpDetails.setwUrl(wUrl);
    lpDetails.setuName(uName);
    lpDetails.setpWord(pWord);
    lpDetails.setlNotes(lNotes);

    loginArrayList.add(lpDetails);
    webNameList.add(sName);
 }

   sqliteDatabase.close();
   return webNameList;
 }



  @Override
   protected void onResume() {
   super.onResume();
   loginListAdapter = new ArrayAdapter<String>(this,        android.R.layout.simple_list_item_1, populateList());
    loginList.setAdapter(loginListAdapter);
 }

  @Override
   public void onItemClick(AdapterView<?> arg0 , View arg1, int arg2, long arg3) {
   Toast.makeText(getApplicationContext(), "Selected ID :" + arg2,     Toast.LENGTH_SHORT).show();

Intent updateDeleteLoginInfo = new Intent (this, UpdateDeleteLoginList.class);

LoginDetails clickedObject = loginArrayList.get(arg2);

    Bundle loginBundle = new Bundle();
loginBundle.putString("clickedWebSite",clickedObject.getsName());
loginBundle.putString("clickedWebAddress",clickedObject.getwUrl());
loginBundle.putString("clickedUserName",clickedObject.getuName());
loginBundle.putString("clickedPassWord",clickedObject.getpWord());
loginBundle.putString("clickedNotes",clickedObject.getlNotes());

updateDeleteLoginInfo.putExtras(loginBundle);

startActivity(updateDeleteLoginInfo);
  • 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-06-17T10:50:10+00:00Added an answer on June 17, 2026 at 10:50 am

    You’re using startActivity. Why don’t you use startActivityForResult instead? The answer to this question details how you would call the second Activity. Once it returns, you would have to use the notifyDataSetChanged() call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing a very simple JavaFX application which will hopefully display information from
I currently send some data as an array from my CodeIgniter controller to a
I'm unable to transition from index.html to any pages correctly. All transitions would show
Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
I'm currently trying to implement a UITableView with a delegate and data source that
I am currently working on a website. For debugging reasons, i chose the view
I have currently a webview in android. But the webview is unable to show
I am unable to call my script.js file from inside jade though javascript renders
Currently, I have a ruby variable accessible by the view called @json (which contains
I currently have a Container View Controller which is home to a button. When

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.