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

Popular posts from this blog

javascript - Complete OpenIDConnect auth when requesting via Ajax -

c# - Replace text in MailItem Body -

java - Get more than One value and display it -