Android : How to generate Id for dynamically Generated TextView in Android?

on Monday, September 29, 2014


When I dynamically generated a View, like textView, how can I automatically generate an Id for this textView? I know I can use the method setId, but I'm afraid that this Id i manually set would possibly conflict with some other Views' Id. Just in case! When I set the layout parameters in relative layout, the id for all views seems necessary. Is there any method i can use to fix this? Thanks!


0 comments:

Post a Comment