Questions tagged [onitemclick]

OnItemClick is a callback method invoked when an item in an Android AdapterView has been clicked.

274 questions
3
votes
2 answers

Get Clicked ListView item attributes

I have a Windows 8 application with a ListView: There is some Event objects (a separate class with string attributes like EventType, Description,…
alltestgreen
  • 149
  • 1
  • 12
3
votes
1 answer

Click item in Horizontal ListView

I have created horizontal listView as described in http://www.dev-smart.com/archives/34 . Everything works fine the only problem is that the effect we get when we click an element (color change of the clicked cell) is not there in the custom…
pvn
  • 2,016
  • 19
  • 33
2
votes
2 answers

fire OnItemClick on listview when button is clicked

I have a ListView that contains button on each item. I want that the item click will cause the OnItemClick event of the list to fire, as that event contains more info (id,position) than the OnClick event of the button. This is an important action on…
Shlomi
  • 343
  • 5
  • 23
2
votes
2 answers

Can't start activity from class

I am trying to start an activity from a normal class and I can't figure out how it is done, if it can be done. On an itemClick I want to start an activity that extends the ListView class to show a list of options. Also the class that receives the…
plast
  • 213
  • 2
  • 11
2
votes
1 answer

App crashes when clicking on list item: FATAL EXCEPTION: main, .onItemClick

This code was working fine in eclipse, but now i imported to android studio 4.1.1.I have all latest updates and correct libraries, tried to invalidate caches and restart, clean, tried different deveices and tried different API levels.My app starts…
2
votes
1 answer

I can't find a way to select items from a list, each made of three text fields

I have looked at tens of examples and tutorials, and I have tried to repeat the same steps, but it is not working. In my activity, I have four onClickListeners that work perfectly fine and are related to four buttons on the top part of my layout.…
Bob-it
  • 87
  • 1
  • 8
2
votes
2 answers

List AdapterView onItemClick is not triggering

In the ListView onItemLongClick is getting Triggered but onItemClick is not getting triggered. I want both onItemClick and onItemLongClick to trigger. onItemClick will call item detail activity onItemLongClick will favorite the item Here is my…
Kaleel
  • 43
  • 7
2
votes
2 answers

Save state of the item selected in RecyclerView when view is reused while scrolling

I have created an Adapter and ViewHolder for the recyclerView. I bind the imageButton of the itemView inside the Viewholder. And have set an onClickListener inside the onBindViewHolder. Everything works as expected but the issue is now when i…
2
votes
2 answers

Expandablelistview android with checkbox at onclick select more items

I apologize for my English. I am trying to write a application which use checkbox in ExpandableListView, but, when i click on an item list, the list checked the clicked item and subsequent items with period 6. For example if I click on firt item are…
Bruno
  • 21
  • 1
2
votes
1 answer

Tapped Image inside a ListViewItem UWP C#

I have a listView that has an Image in every listViewItem. I have 2 events: ItemClick on the ListView and Tapped on the Image. By default isItemClickEnabled is false in the listView, when it is false: the tap Image event works but not the…
yalematta
  • 1,389
  • 1
  • 21
  • 36
2
votes
3 answers

Xamarin, Both ListView and RecyclerView, click one item, another one selected

I'm having a trouble with both ListView and RecyclerView Initially, I created a ListView, everything is fine. Then I set onClick event for it so that every time I click an item, it changes its color to yellow. The OnClick function I wrote in the…
LaXuanLinh
  • 47
  • 1
  • 9
2
votes
1 answer

Click on RecyclerView Item for details

I have a RecyclerView with items (Books) inside it, and I want that when clicking on one item - a new activity will be opened (DetailsActivity) with item details. import android.content.Context; import android.content.Intent; import…
Nick
  • 499
  • 4
  • 11
  • 25
2
votes
2 answers

Android: OnItemClickListener returns the value of the last item

the code bellow was working so fine with me but now i don't know what's wrong with it!! whenever i click to an item it put the value of the last item to the intent! any idea? protected void onPostExecute(List> result) { …
Fadwa_lmh
  • 276
  • 2
  • 11
2
votes
3 answers

TextView (in a ListView) onClickItem not registered when clicking on the text itself

I made an InfoscreenActivity which brings up an "Settings/About" page in my app (with app version info, licenses, contact, setup and back-up options). The items on that page are generated in a ListView using a custom ArrayAdapter called…
kazume
  • 1,333
  • 2
  • 16
  • 30
2
votes
2 answers

onItemClick get ID or Name of item on array

I have this array: Home New History Categories Store
1
2
3
18 19