Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

How to get a phone_Number from contacts ListView on onItemClicklistener

In your onItemClick(), you're using li.findViewById().

But, onItemClick() returns View as an argument of the clicked item, which is also mentioned in the official documentation.

Hence, try updating it as

TextView txtNummber = view.findViewById(android.R.id.text2).

Check if it works.

Tags:

Java

Android

Android Contacts

Related

Further explanation of Svelte's keyed each block Devise redirect to on successful login seems to get stuck on first login attempt How to create masterKey after MasterKeys deprecated in Android Installing MongoDB in WSL How to compare 2 files having random numbers in non sequential order? What is `getOptionSelected` and `getOptionLabel` in Material UI with an example? Including typings for third-party library gives module not found via angular CLI? Unable to make the mentioned regular expression to work in sed command How to delete all lines before the first and after the last occurrence of a string? Creating a new column assigning same index to repeated values in Pandas DataFrame Are there any issues with returning from a function before a promise has been resolved? Is std::less supposed to allow comparison of unrelated pointers at compile-time?

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy