Questions tagged [onitemclick]

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

274 questions
1
vote
3 answers

LISTVIEW - onItemClick not working

I'm at my first steps into Android... I already read some of the answered question, and I tool a lot of tips, but I don't find how to solve my problem. In the activity Categories.java I have a listview built starting from a database. The listview…
jessyjemy
  • 35
  • 5
1
vote
1 answer

onItemClick using multiple ListView

i have a layout with multiple ListView that work perfect and i can't capture any click on any item. The items on all the ListViews has the same type of information and i intend to use one Adapter to show that information on another layout. I've…
1
vote
1 answer

Custom Listview - where do i set my on click handler

I have a custom ltView with a listview adapter class and i have a code stub which populates 4 rows of my lsit view. The xmls etc are looking good and the activity builds itself ok but i cant seem to insert a handler without causing an error. Here is…
Fearghal
  • 10,569
  • 17
  • 55
  • 97
1
vote
1 answer

How to Handle the OnItemClick and OnItemLongClick event while the ListView has setOnTouchListener

A ListView that I have setting the onTouchListener to implementate the item swipe function, and I still need the onItemClick and the onItemLongClick event, but I can't do it. while I do noting int the onTouch function, and return false, the…
naiyu
  • 745
  • 3
  • 9
  • 25
1
vote
5 answers

How to implement click listener on custom listview

I have created custom list view, in a list there are 2 images(left,right) and a text in the middle when user click on image1, activity1 will be called and user clicks image2, activity2 will be called and when user clicks on text activity3 will be…
1
vote
1 answer

Highlighting a Grey Icon in ImageView to White when the whole list entry is clicked in ListView, then reverting back

I have a list of icons and text in a list view. The icons and text are grey in the list with a white background. When a user clicks an entry the icons and text are supposed to turn to white and the background of the entry box turns orange. I got the…
1
vote
1 answer

How to prevent two events from firing simultaneously in extjs

My grid has check box selection model. on item click i have some logic to do. But when i select check box it firing select and item click event. How do i prevent item click event on check box selection.I am using ExtJS 4.1 Thanks
1
vote
1 answer

CursorAdapter onitemClick of listview

Hi I am developing an android app with CursorAdapter for loading the listview. onItemClick of the listview item, I am trying to start a dialogue activity. adapter = new ConversationAdapter(MainActivity.this, cursor); …
1
vote
1 answer

onitemclick() returns wrong value

i have an onitemclicklistener() implemented in my listview that shows all my database info onitemclick((AdapterView parent, View viewClicked, int position, long bezoeknummer) shown snippet of code returns me the first column…
keuninkske
  • 61
  • 9
1
vote
1 answer

Android GridView with WebView does not work in OnItemClick Event

I have a problem because I can not capture the OnItemClick event in GridView (the item has a TextView and WebView). I load the data in GridView correctly but the onItemClick does not work Here is my code: list_item_layout_redes.xml
user2316075
  • 479
  • 5
  • 16
1
vote
1 answer

override dispatchTouchEvent cancels onItemClick in row

I'm override dispatchTouchEvent in my Row Class. @Override public boolean dispatchTouchEvent(MotionEvent event) { my code... } But now don't call method onItemClick in adapter, because dispatchTouchEvent do my actions and return true. How…
Evgeniy S
  • 1,464
  • 12
  • 32
1
vote
1 answer

Send data to database on click android

I have two activities and a database. I want to send the data from the first activity to the data base and then move to the next activity. I know this is wrong but it is the best I could find online, any other ways of doing it? OnItemClickListener…
1
vote
1 answer

Android JUnit HorizontalListView performItemClick() not working

During my unit Tests I want to basically test if an Activity is started by a simple pressure on a button, that is in an HorizontalListView. I've already succeed in starting new Activities during previous unit test but this one is not acting as…
GiyommStarsky
  • 31
  • 1
  • 6
1
vote
2 answers

AlertDialog does not fire on ItemLongClickListener

I´ve got a ListView that I give an OnItemLongClickListener. On LongClick on an Item, an Dialog should be shown. lv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { public boolean onItemLongClick(AdapterView
user896692
  • 2,351
  • 7
  • 36
  • 57
1
vote
4 answers

lv.getItemAtPosition(position) crash

I'm new to android been learning as I go, and now at a point where I can't find an answer. My question Why am i crashing. I know my problem lies at: Music m = (Music) lv.getItemAtPosition(position);. I can comment that out and substitute a string…