Questions tagged [onitemclick]

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

274 questions
1
vote
2 answers

AutoCompleteTextView - how to determine which item of original list was selected?

I am trying to use an AutoCompleteTextView to choose an item from a potentially long list of candidate items. I can display the list fine, and I can get the call onItemClick when the user chooses one of the autocomplete suggestions. The problem is,…
1
vote
2 answers

Listview click is not fire.

I created custom adapter for listview which contain text and images, on click of particular list item I have to open another activity, but I am not able to fire listview click event, below is my code. Thanks. Adapter public class…
Ishtiaq
  • 1,206
  • 9
  • 18
1
vote
1 answer

Android - Force close if i click item on ListView

I need your help to fix my code. My intention is if i click the item on ListView it will take me to intent action_view. The problem is i got force close if i click the item on ListView. I think the problem is in onItemClick method, can you give…
forgiven24
  • 49
  • 2
  • 10
1
vote
1 answer

Recyclerview single item selection with changing color in android kotlin

I have question, I want to make an item clicked in recyclerview, in adapter class I used the below method for define item clicked: var onItemClick: ((ResponseGetDate) -> Unit)? = null ResponseGetDate is the data class also in the viewHolder (inner…
1
vote
1 answer

Get ListView item's details on ItemClick() event

I've tried searching around here and on microsoft docs but I can't find a solution to my specific query, as mainly I've seen posts about how to do things on itemclick rather than retrieve data. I'm currently using an API, which sends a JSON request…
1
vote
0 answers

ApexChart: Allow for the display only the series item clicked on the legend

I've used the legend option so the user could select the data he wants to display on the chart. But there's a lot of info on my chart and when it loads all the legend options are selected. What I really want is that the chart starts with only one…
Cezene
  • 73
  • 2
  • 14
1
vote
1 answer

Get ArrayList value and set it to a TextView on Button Click Not Working - RecyclerView

My last question hopefully for this week.. I have set up a RecyclerView with an Array that iterates through numbers 0 - 350 in increments of 10. This pops up as an overlay over the activity by clicking a TextView (dailyGoal). Once a value has been…
Caitlin
  • 531
  • 5
  • 19
1
vote
1 answer

How to get other column with onItemClickListener in ListView

I am working on a Shopping list where you can click on the item in the ListView and a dialog comes up. There you can modify the product name. It works fine, but now i am trying to add details. Adding to database already works. It is in the third…
1
vote
3 answers

How to save state when item is Clicked in Android recyclerVIew

I have created a recyclerView and handle items in it being clicked. Now I need to change the text displayed when one item is clicked. First it says 'day' and after I click it it should say 'finished'. It worked but after I close and re-open the…
1
vote
0 answers

How to call api on recyclerview item click event in MVVM structure?

I am creating Adapter (for Recyclerview) using MVVM structure in Android, where I have created ViewModel class for each item of recyclerview. now I want to call an API on Onclick() method of recyclerview in android. I cannot call API in…
Akshay
  • 111
  • 1
  • 12
1
vote
0 answers

Item click is not working, while auto scroll in recyclerview

I have used the following code to autoscroll the Horizontal recyclerview. private final Runnable SCROLLING_RUNNABLE = new Runnable() { @Override public void run() { recyclerViewDate.smoothScrollBy(pixelsToMove, 0); …
Manikandan
  • 1,479
  • 6
  • 48
  • 89
1
vote
0 answers

Navigation Drawer - Group item click behaviour

Good day ! I've got a problem with Navigation Drawer, only when I split items into two groups. Here is what is going on : When I split them into two groups ( Settings, Profile etc. ) and another one for Sign Out ( just because this one has…
1
vote
1 answer
1
vote
1 answer

Recycle view get item value base on item clicked

I just create a dialog with a recycle view on it. When i click the item it supposed to set the edit text base on what i click. But it doesn't, it shown the first value in the recycle view. could someone help me to get the value base on what i click.…
1
vote
1 answer

First Time On List item Click Text Color not Changes

I have a custom list view in fragment , and on Item Click text color changes and marquee running, but on first time item click none of things is working , no marquee or no text color changes, and on second time click both working fine. Please…
Sumit Kumar
  • 643
  • 1
  • 8
  • 19