I\'m looking for ways to reduce what I would call \"id pollution\" in my apps. From what I can tell, R.id
is global to the application, so in every Activity I
I use:
R.id.activityName_type_action
where type may be [btn|txtview|edittext|listview...]
and action is something like [save|del|accept|name|pin...]
It's pretty verbose, but this way I can guess the identifier name from the activity without having to continuosly check the xml layout.
For example:
R.id.loginpin_btn_accept
R.id.loginpin_txtview_pin