Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello :)

I tried to make an android app, that populate some data from sqlite database to a list view

using arrayadapter,

the list I store data into is like this:

Java
private String[] allUserColumns = { MySQLiteHelper.COLUMN_USERID,
			MySQLiteHelper.COLUMN_USERNAME };


I want to move to another activity passing the ID related to user name by click at a listview item

I know that I should use setOnItemClickListener method

but actually I don't know how to do that,

I mean how to get the ID, and how to set the setOnItemClickListener Method to make such task

I tried google and get some codes, but nothing success with me

please any one can help me with a specific code ?



thanks all :)
Posted

1 solution

To setOnItemClickListenervisit this site:
Android Listview Onclick[^]

This 2 will help u to shift Activity:

Android: How to switch between Activities[^]

Changing Activity in Android[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900