same View a]ributes along similar Views (e.g., label TextViews) • NOT for every single View • NOT when two Views happen to have some a]ributes in common
is not defined, you get a very ugly (and difficult to debug) explosion • Create a default theme that applica:ons using your library can extend (to avoid explosions)
to duplicate data structures • Solu:on #1: getIden:fier() getResources().getIdentifier("drawableName" , "drawable", "com.mypackage.myapp"); • Solu:on #2: reflec:on Class res = R.drawable.class; Field field = res.getField("drawableName"); int drawableId = field.getInt(null);