OnItemClick is a callback method invoked when an item in an Android AdapterView has been clicked.
Questions tagged [onitemclick]
274 questions
-1
votes
3 answers
How do I fix Intent.getExtras()' on a null object reference?
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
-1
votes
1 answer
How to fix not click when the fragment this open?
I have a Recycler View and when I click an item I open a fragment with information about that item.
Well I have the problem that even open the fragment, I can keep clicking to the other elements of the list.
As I fix, you can be?
The problema is…

Maria P
- 21
- 2
-1
votes
1 answer
Android searchView with open Activity
My application is searching string and if I click open activity,
But my problem with position, if I write Second and after click its show me first activity .I wanna open just second activty
protected void onCreate(Bundle savedInstanceState) {
…

user2741142
- 11
- 2
- 6
-1
votes
2 answers
onItemClicked from fragment to activity
i have a listView of item in a fragment. when i click one of the item, it will open another activity and show the details of the item. but when the progress bar is loading then the whole app crashed.
EditProductActivity.java
public class…

abyss
- 24
- 9
-1
votes
2 answers
How to play video in listview onitem click in the same view?
How can I display the video in same view of ListView when I click the item of ListView like the image below?

Ajay
- 185
- 3
- 18
-1
votes
1 answer
NullPointerException in onItemClick()
I am creating navigation drawer list view that make changes in a specific text view according to the position of the list view , but always had that exception many times and I don't know how to solve it
MainActivity Class
public class DBHelper…

Ahmed Nabil
- 1
- 5
-1
votes
2 answers
make a call onItemClick in a List View
In my Android app, I made an SQLite database containig
(_id, FRIEND_NAME, FRIEND_PLACE(detailed address), FRIEND_PHONE, FRIEND_LOC(location), FRIEND_CATEG)
Also i implemented a List View wich displays all the FRIEND_NAMEs (from the database).
I…

M.M.Rame
- 113
- 1
- 9
-1
votes
1 answer
android viewpager with listview, how to implement OnItemClickListener for each listview?
sorry for my low level of English.
I have an activity that consists of a viewpager, 4 ListView listview.
How could i implement a listener to know which item is touched by the user?
I searched the web all day long unsuccessfully
Code…

Emmanuelguther
- 1,039
- 4
- 19
- 29
-1
votes
1 answer
List not clickable in some phones
I have a list of items in android app, and i want to start another activity if the user clicks on any item in that list. I have the following piece of (relevant) code.
Strangely enough, its working good enough on HTC velocity 4g (android 2.3.7),…

user2904943
- 25
- 5
-1
votes
1 answer
onListItemClick in a fragment
I have a Main Activity which extends Activity. It uses drawer navigation like in android sample. On the sliding menu I have a list of chapters. When clicked a list of lessons of that chapter is shown in content fragment inside the main activity.
So…

Kian Tamar
- 96
- 1
- 12
-1
votes
2 answers
OnItemClickListener not triggering on custom ListView
I'm having a problem with OnItemClickListener on a ListView, the OnItemClick overridden method is not triggered... Here's my code:
public void popupCatCategories(){
LayoutInflater layoutInflater =…

Jean-Paul Manuel
- 546
- 2
- 12
- 29
-2
votes
1 answer
How to delete value on variable
I am new to Android and I have a question.
I have a recyclerview that can be clicked and will send a query. When clicked, it will get a number/ID of each position that is clicked,
like this:
fno = arrivals.get(position).flightno;
codeCity =…

Belsazer Razer B
- 21
- 4
-2
votes
3 answers
Android intermittent error onitemclick java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
Can't figure this one out and I've searched quite a bit. Can't simulate the error on any of my test devices but happens occasionally to some of my users.
I have a custom listview adapter, 6 items are pulled from an online db and added to the list. I…

Adam First
- 435
- 1
- 4
- 19
-2
votes
1 answer
Take position with onItemClick in a fragment
I am trying to implement an onItemClick within a fragment, when clicking on an element, but I have no result yet someone can help me?
public class FotoFragment extends Fragment {
private List mediaList = new ArrayList<>();
…

Devix
- 432
- 5
- 16
-2
votes
1 answer
navigation between activities not working
I am using list view in my android app. list view is working fine, but when I try to navigate to another activity on item click, my app crashes and shows message on emulator that your app has stopped unexpectedly.
Here is my onItemClick code…

Arain001
- 109
- 1
- 2
- 10