android - Using findViewById() inside a for loop for multiple checkboxes -
if have many checkboxes ( more 50 ) , there way use mapping of checkboxes , inside loop ? , how assign int inside findviewbyid(int).
something : - (array of checkboxes)
for(int i=0 ; i<=99; i++) checks[i] = (checkbox)findviewbyid(what-about-this-int-id);
you can resource id's dynamically using getresources().getidentifier(..)
: https://stackoverflow.com/a/14058142/1715829
Comments
Post a Comment