Ad
How To Set Unique Id For Views (like Button) On Listview That Made By Simple Cursor Adapter In Android Java?
I create a dynamic custom listview that contain some elements like button ImageView and etc using custom adapter cursor adapter. this is problem when i click on any button because of duplicate id i lost my specific button. i have set tag for each button and is correct but i can't find my button id. Also i use "button.setID()" but is not worked in some elemnts. How can I set unique id for views (like button) in this case? (In the general view I want work with any element in my listview separately )
Ad
Answer
You don't need different button
(any view) ids... Just access the item with Position
and find the view with ID.
Kindly read and understand the docs before apply..
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad