Questions tagged [onitemclick]

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

274 questions
0
votes
3 answers

Listview onItemClick doesn't work as expected

this is a weird question that I'm extremely curious about. I have a listview of profiles and when i click on a particular one i want to view that particular profile by itself. When i try to select an item in the listview it generally doesn't work…
user3597639
  • 47
  • 2
  • 11
0
votes
1 answer

Two different Listviews in one Activity, only one gives right ItemClicks

I have two listviews on one activity, everything is working fine, but if I want to get the clicked items from listview 1 and listview 2 I can only get the items from listview 1 activity_smokes:
Ribisl
  • 149
  • 1
  • 10
0
votes
1 answer

setOnItemClick isnt getting recognized(Android)

I am displaying a Listview of recorded data and when the user clicks on a specific list item, it triggers an intent and brings the user to the profile for that selected user. I worked when i first ran my project but ever since it just will not work.…
user3597639
  • 47
  • 2
  • 11
0
votes
0 answers

There are 2 listviews in an activity, when I click on item in the second listview the item should be added to first listview

The problem is that each time I click on item it is replacing the item that was added early, so the first listview has only the last added item. Here is my code: lvUsersList.setOnItemClickListener(new AdapterView.OnItemClickListener() { …
Yusuf
  • 145
  • 6
  • 12
0
votes
1 answer

OnItemClick of a ListView

I want to appear a new activity when I click on a ListItem, this is my whole code: This is the ListViewActivity's code: import java.util.ArrayList; import java.util.HashMap; import java.util.List; import json.JSONParser; import…
0
votes
0 answers

Instead of using position in OnItemClick how can i use view to filter Strings in android Studio?

i have used position for filtering the strings. as code below String p = words[position]; String[] description = getResource().getStringArray(R.array.description_string_array);final String deslable=description[position]; Intent i = new…
0
votes
1 answer

Problems with the Click event of a ListView in TabHost

I have a problem. I'm developing an application that uses Drawer Layout with reference this example https://developer.android.com/training/implementing-navigation/nav-drawer.html The lateral menu works correctly, but my fragment (content) load 3…
Brando T.
  • 173
  • 1
  • 7
0
votes
1 answer

Gallery onClick for previous/next image

I have a gallery with bunch of images. I'm able to perform onItemClick for one image. But I want to add left/right buttons to get the pervious/next image. How can I do that? Below is the code for onItemClick @Override public void…
Le_Master
  • 147
  • 1
  • 2
  • 20
0
votes
1 answer

Item Right Tapped in ListView WPF

Is there a way to get OnItemRightTapped event on ListView or GridView that works exactly like ItemClick, except obviously react only on right tap?
astor
  • 1
0
votes
1 answer

how to open another activity when i click on listItem using SQLite Database and display in TextView using Intent in android

In my project there three java classes they are: MainActivity.java,Activity2.java and DataBaseHelper.java. with two xml layouts. now i want to pass datas from MainAcitivity to Activity2 when i click on ListItem of activity_main layout and which is…
0
votes
2 answers

Save again the data in List Android

So, I have two activities. In the first one, I have a list where I put some data and a button for going to the second activity. In the second one, I have two EditTexts and a button (save button). When I introduce some data in the EditTexts, I save…
Domizzi
  • 53
  • 1
  • 10
0
votes
1 answer

Handle only one either Recycler view's item click or inside view click

By following Handle Button click inside a row in RecyclerView and Issue with CardView and OnClickListener in RecyclerView my code is working for both view i.e complete row and imageview inside row. If imageview inside row is clicked then onclick of…
turbandroid
  • 2,296
  • 22
  • 30
0
votes
2 answers

ClassCastException for onItemClick variable

I am getting a ClassCastException for the pid variable that I am trying to show on screen. I know that the item at the onclick position is a string that is casting to RunningAppProcessInfo which is causing the exception, but I cant figure out how I…
gt53
  • 13
  • 5
0
votes
3 answers

android - ListView short blink on OnItemClickListener

In OnItemClick() method I load new Activity. My ListView item blinks on OnItemClick() (I mean, changes brightness a little or something - don't know how to say it correctly), but blinks just for a moment and then returns to its previous appearance…
Justin McGuire
  • 365
  • 1
  • 5
  • 18
0
votes
1 answer

want to show image OnItemClick on listview item in dialog box

I want to show a image on click item of listview which is showing in dialog. But as I click on item is Image is showing in multiple items Can anyone suggest me how to do this. listQuantity.setOnItemClickListener(new…