You can get resource id you defined for current theme in code, like:
TypedValue typedvalueattr = new TypedValue();
getTheme().resolveAttribute(R.attr.ic_action_pause_over_video, typedvalueattr, true);
mPauseButton.setImageResource(typedvalueattr.resourceId);
How to use styled attributes for multiple themes in XML layouts you can read there.