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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:15:48+00:00 2026-06-11T19:15:48+00:00

I have a problem with my android app. I have a ListView and this

  • 0

I have a problem with my android app.

I have a ListView and this ListView get the data from a Database and I bind it via a SimpleCursorAdapter.

Now I have a button to add a new entry to the database, then a new intent is started and I create a new item and add it to the database. After adding it, I go to a new page.

Now I want to have the following:

When I get to the new page, and I press the back button, I don’t want to be forwarded to the create new item page, I want to skip it and go directly back to the ListView.
The other problem, is that the ListView should then display the new entry. It should refresh in some way.

How to realize this?

  • 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-11T19:15:49+00:00Added an answer on June 11, 2026 at 7:15 pm
    1. When you create your new Intent to add the item to the database, make sure you set the Intent.FLAG_ACTIVITY_NO_HISTORY so that the new Intent is not kept in the history stack
      eg: myIntent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)

    2. When an adapters underlying data is changed and you want the change to reflect in your ListView, call the adapters notifyDataSetChanged() method (in your case, on clicking the back button)
      eg: myAdapter.notifyDataSetChanged()

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

Sidebar

Related Questions

I'm using ormlite for my android-app. But now i have a problem. I have
I have the following problem. I want to read data from a Database in
Hello i have a problem with this aplication. import java.util.ArrayList; import java.util.List; import android.app.Activity;
I have an app in android in which I return some data from facebook
I have a problem regarding Android App. I have created an application that download
I have a problem on an Android app. I have 2 activities : Activity1
I have a strange problem in my PhoneGap-based android app. On certain screens, the
I have a problem with my soundboard app for android. When I test it
I published my first app to the Android Market an have the weird problem,
I have problem with android 4.0.3. I'm using the method below to get local

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.