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

  • Home
  • SEARCH
  • 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 8352423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:57:26+00:00 2026-06-09T08:57:26+00:00

I am deleting an item through my dailogfragment from database and listview through database

  • 0

I am deleting an item through my dailogfragment from database and listview through database . I am able to delete the item from the database , from the listview , and able to refresh the list with the item deleted removed from the listview .

But the problem is i am getting some type of black bar ( background behind the deleted item ) immediately after deleting the item : http://i733.photobucket.com/albums/ww331/suntuu/Capture-1.png

in the image you could see my default background is white ( theme.holo.light) , but after deleting this black background pops out at the end .

When i am executing the listview fragment again , it goes away .

I am stuck with this for a very long time now .

Here’s my xml layout file :

 <?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="match_parent"
    android:cacheColorHint="#00000000"
    android:orientation="vertical" >

    <ListView
        android:id="@+id/list1"
        android:cacheColorHint="#00000000"
        style="@style/AndroDev"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:dividerHeight="2dp"
        android:paddingBottom="1dp"
        android:paddingTop="1dp" />

</LinearLayout>

and here’s my style/androdev :

  <?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">

    <style name="AndroDev" parent="@android:style/Theme.Holo.Light">
        <item name="android:background">#F7F7F7</item>

    </style>

</resources>

UPDATE:

After removing the style from my listviee this problem seems to be gone , but then i am stuck with using default background for list item background , which i want to be custom .

So how could i achieve it .

  • 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-09T08:57:28+00:00Added an answer on June 9, 2026 at 8:57 am

    SO I have solved it . The problem was with using my own style for getting the custom background for the listview item , which wasn’t right .

    So I implemented my custom background for listview rows using this :
    ListView item background via custom selector

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

Sidebar

Related Questions

After deleting from database my ListView does not update , I found a method
I am reading some datas from database and displaying it in a listview.After deleting
We have a problem deleting Appointments from Exchange using EWS. We try to delete
I'm looping through an object in javascript and deleting an item that is undefined,
When deleting a record from the database, occasionally I will run into a reference
While deleting an item I want to update another list. Below is my code.
I'm having some trouble deleting an item from a collection inside a model when
I have this simple method of deleting list of files. But for some cases
I have problem with deleting rows from table. I have a class for cell
i am trying to delete an item list when the user taps on a

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.