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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:23:02+00:00 2026-05-31T10:23:02+00:00

Hello I have a problem with the onListItemClick Method on a ListFragment. I have

  • 0

Hello I have a problem with the onListItemClick Method on a ListFragment.

I have an activity that holds 2 ListFragments. The first one is a sub navigation and the second one shows some content. The sub nafigation werks perfectly fine and the onListItemClick event is invoked when clicked on a list item. But for the second ListFragment, nothing happens. The method is not invoked.

So far I also tried to replace the Listfragment with a Standard Fragment and set the setOnItemClickListener manually. But it is not fired when I click on a list entry. I also tried to test it with a different Listener (e.g onLongItemClick), but nothing happened either.

These are the settings for my listview.

   <ListView    
            android:id                  ="@+id/mylistview"
            android:layout_width        ="match_parent"
            android:layout_height       ="match_parent"
            android:divider             ="@android:color/transparent"
            android:dividerHeight       ="10dp"
            android:listSelector        ="@android:color/transparent"
            android:cacheColorHint      ="@android:color/transparent"/>

Note, that i replaced the id with the standard “@android:id/list” when using a ListFragment.

Does anybody know what goes wrong here ? Can it be that the other ListFragments gets all the onListItemClick calls and prevents this one from being fired ?

Here is the adapter that is attached to the list:

setListAdapter(new CustomRatingBarListAdapter(mListEntries,
            getActivity(), R.layout.content_view_list_layout,
            new int[] { R.id.list_item_text1 }, new String[] { TEXT});
  • 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-31T10:23:04+00:00Added an answer on May 31, 2026 at 10:23 am

    Ok, I found the error. It was something complete different.
    In fact I had a rating bar as a list item and even tough it did not cover the whole list item it somehow got all the click events.

    Changing the visibility to GONE for now solved the problem. So the problem was here the layout of a single list item and not the adapter.

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

Sidebar

Related Questions

Hello I have problem to put together animations of two separate objects to second
hello i have a problem that's maybe difficult to descripe, i have an application,
Hello I have this problem with PyQt4-dev-tools that include: * a user interface compiler
Hello I have a problem to retrieve a value from a method. I'm using
Hello I have a little problem with assigning property values from one lists items
Hello i have problem with my sms aplication. import java.util.ArrayList; import java.util.List; import android.app.Activity;
Hello i have a problem with this aplication. import java.util.ArrayList; import java.util.List; import android.app.Activity;
Hello I have a problem with a binding that I want to do and
hello today i have a problem how can this happen ? everything that is
Hello I am a Java web app developer I have a problem, I would

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.