OnItemClick is a callback method invoked when an item in an Android AdapterView has been clicked.
Questions tagged [onitemclick]
274 questions
0
votes
1 answer
Application Crashes on clicking RecyclerView List Item Holder class
I am new to Android development. In my app, I was populating RecyclerView from MySQL database using JSON, and created multiple multiple Activities. Application is running smoothly on Emulator on my PC, but when I try running app on my Android phone,…

Sheikh Saadi
- 5
- 3
0
votes
1 answer
Expandable listview; onitemClick
I want to make an expandable listview that should respond when the user clicks on one of the items/children of the listview (onChildClickListener?). Can anyone help with the code? I have already made an expandable listview in which I have made my…

VanDijk1234
- 1
- 3
0
votes
2 answers
Difference between physical and programmatically click on ListView
I am clicking ListView item programmatically on onCreate method like below:
// setting listener for ListView item click
listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void…

Viks
- 1,510
- 4
- 22
- 50
0
votes
4 answers
OnClickItem with unknown number of items Android
I have an array of objects. In my listview, I pass only the name of those objects but when someone clicks on any of them, I want a new window to pop up and to see the extra information from my items. Can I do that somehow?
This is how my list…

Mocktheduck
- 1,333
- 1
- 22
- 43
0
votes
1 answer
OnItemClick Listener for AlertDialog.Builder
I am using an AlertDialog which displays a single choice list based on SimpleCursorAdapter:
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setAdapter(cursorAdapter, new DialogInterface.OnClickListener() {
…

WolfTT
- 1
- 2
0
votes
1 answer
button OnItemCommand not firing inside asp:Repeater
I have a web forms project where i have the following button wrapped in an asp:Repeater

Paul
- 620
- 11
- 35
0
votes
0 answers
Handling ListView item clicks with ButterKnife
I am trying to handle item clicks on a listview using either the regular AdapterView.OnItemClickedListener or the ButterKnife @OnItemSelected annotation, but none of them work.
I have tried logging to see if any of the clicks come through by:
…

Alex Kombo
- 3,256
- 8
- 34
- 67
0
votes
2 answers
trying to change background of imageButton in List item
Objective
I want to play sound on click of List item with ImageButton (initially hidden, visible on click) showing play pause (2 images) resource.
ImageButton is only to show state of sound to user.
Problem
When I scroll the List, imageButton is…

Kamran
- 3
- 4
0
votes
2 answers
On item click grid view and SQLite - Android
I want to populate a list view based on grid item click. If user clicks the first grid item I want to show the list view according to it. I have used a pre populate SQLite database here.
What I tried is , to get item click id in first activity and…

codehesh
- 875
- 10
- 29
0
votes
2 answers
exception when click on listview before image loads
There is a custom listview which displays image and text. I am using Glide image library to load the image. So when i search the image and text displays in listview but before image loads if i click on it Java Null Pointer exception is seen. How to…

user2269164
- 1,095
- 2
- 15
- 31
0
votes
2 answers
onItemClick ListView, different adapters
I have slidingTabLayout, with different Json request.
Until now i have managed to get for each page_adapter the different requests based on different queries.
What i want to do now, is when i click on the item, it sends me to the article_layout, but…

ddnice
- 25
- 9
0
votes
2 answers
Implement click only on image not on text in custom listview
I have a custom Listview where it contains image & text and implemented the OnItemClickListener for list which should work only for image not for text. OnItemClick is working fine for image but there is a Fatal Exception when i click on text.…

user2269164
- 1,095
- 2
- 15
- 31
0
votes
1 answer
android setOnItemClickListener and onItemClick keeps giving me the same Toast
I'm trying to get the contact's CONTACT_ID, when their cell is clicked. Do you know how I can do this?
At present, Toast keeps giving me, no matter which cell in the list I click, '215', which is the CONTACT_ID of my first contact. Here's my code…

CHarris
- 2,693
- 8
- 45
- 71
0
votes
1 answer
Items in ListView not reacting
Im programming an app and I created a slide-in-menu containing a ListView.
But the items aren't clickable. After clicking one of the items the slide-in-menu closes and nothing happens, although it should toast something.
Here is my Code:
…

Xaver Seiringer
- 1
- 2
0
votes
1 answer
How do I get a gridview class to call itself on click, then on another grid item click, reference another activity?
Another class calls the GridView class below that is populated with images from a parse server, if a user clicks on a grid item, it starts the same GridView class with different bundled strings so it can pull from a different parse database class. …

GCQ
- 190
- 3
- 11