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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:27:43+00:00 2026-05-23T19:27:43+00:00

I am trying to implement item click listener on my list in my main

  • 0

I am trying to implement item click listener on my list in my main class that extends Activity, because for some reason if i extend ListActivity and expand my list with setListAdapter, the app force closes on startup, but if i extend Activity and expand it with setAdapter it runs fine.

Now my problem is i cannot find a way to implement a click listener for my list, I have tried implementing it in the custom ListAdapter.

The list clicks are going to open another activity which has another list.

——Updated——

@Override
public void run() {
     // call any new activity here or do any thing you want here
     final Intent intent = new Intent();                       
     if(selectedListItem == 0) {
         intent.putExtra("value1", "value1");
         intent.setClass(this,    com.lister.listexample.ListexampleActivity.class);
     }
     startActivityForResult(intent, selectedListItem);
}
  • 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-23T19:27:44+00:00Added an answer on May 23, 2026 at 7:27 pm

    Change ListView background – strange behaviour

    check the above link where i mentioned a list example. that will enable you to trick down your list problems.

    Try making a sample project first by copy pasting the above example. then you will be able to understand the answer better

    Hope it helps 🙂

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

Sidebar

Related Questions

I'm trying to implement drag/drop/sort between 2 list elements: <ul id=first> <li>item 1</li> <li>item
I'm trying to implement a lazy sequence (meaning that the next item is only
Im trying to implement an activity that uses ExpandableListView and I have gotten so
I am trying to implement the click of the first item of the selectable
I am trying to implement Delete functional to delete item from the listview. Click
Im trying to implement a destructor for the objects of linked-list Iv created. I
I am trying to create a tab that displays a list on the left
While trying to implement a scene where item sizes do not change but distances
I am trying to implement a function on jquery datatable, that returns the 1st
I am trying to implement two actions for each item in a gallery. I

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.